I’m trying to read a php file from a js code in WordPress.
$.ajax({
type: "POST",
url: "/set.php"
The problem is that the php file isn’ t find in the directory, so at the end of js I have the alert of error.
How can I do to find the php file? Someone has a trick?
EDIT:
i’ ve just solved writing the full path as advised by your, but I’ d like to write a “mini-path” without writing the full path. Some advised?
EDIT2:
I’ ve solved writing full path
As cillosis said, just use :