2
我發送一個Ajax請求與相對URL相對URL在PHP
$.post("wp-content/themes/site/function.php", {
}, function (data) {});
它的工作很好,如果我的網址是http://yourdomain.com/page。但如果網址是http://yourdomain.com/page/
那麼它的發送http://yourdomain.com/page/wp-content/themes/site/function.php。但我想http://yourdomain.com/site/wp-content/themes/function.php
檢查htacess –
做u想要什麼? 'http:// yourdomain.com/site/wp-content/themes/function.php' - >'/ site/wp-content/themes/function.php'與'wp-content/themes/site完全不同/ function.php'。檢查你的程序 – sailingthoms