actually, problem solved. I made a mistake putting mysql_real_escape() for the post value, so it was accessing the file, but nothing passed to database. Thanks for the help
У меня проблема с получением URL-адреса в .ajax () для ссылки на правильную папку
В корне у меня есть папки /functions
и /js
Моя php-страница содержит файл js /js/min/custom-ck.js
Внутри custom-ck.js
, у меня есть .ajax () для ссылки на php-файл с именем updatebg.php
в папке /functions
(/functions/updatebg.php
)
$.ajax({
url : '/functions/updatebg.php',
type : 'POST',
dataType : 'text',
data : {
'bg' : bg
},
Может ли кто-нибудь помочь мне получить правильный абсолютный URL?
Большое спасибо.