Skip to content Skip to sidebar Skip to footer

Trouble Accessing File In Other Directory Using Ajax, Am I Specifying The Path Wrong?

In WAMP I changed the root directory from C:\wamp\www to C:\wamp\www\public. I have a file named username.html it communicates through Ajax with simple.php. This works fine if simp

Solution 1:

That is because now, public is your webroot and you are requesting the site from the webserver. The "private" directory is out of the reach of your webserver, because is out of the webroot. You can access it directly from your PHP script (i.e. via fopen(), include, require,... if it is allowed in security settings), but webserver can not serve it directly.


Post a Comment for "Trouble Accessing File In Other Directory Using Ajax, Am I Specifying The Path Wrong?"