0

I am doing ajax call from a javascript file in my plugin to a php file in my plugin itself. Calling like this :

I passed this variable into the js file

plugin_dir_url(FILE);

In the js file, I am doing ajax call using this url :

thatvariable+"myphp.php"

'thatvariable' refers to the plugin_dir_url(FILE) that is passed to js file from php file .

In my local wordpress , its working, but , in the original website with domain, it is processing the destination php file, but returning error saying that file is not found . Also, the console showing the url saying that its not found, but if I click that url , its working . Did I miss any permissions ? What is the solution for this ?

4

1 に答える 1

0

暗闇の中でのショットとして、クロスドメインの問題である可能性があるように思えますhttp://en.wikipedia.org/wiki/Same_origin_policy ajax 呼び出しが Web サイトのベースと同じドメインであることを確認してください。

于 2012-09-14T10:18:20.350 に答える