i have project named myapp in C drive and i am using php built in server so my doc root of project is set to be myapp/public/ containing js,css etc now these js files have some ajax code and calls php scripts in myapp/src folder outside public folder so obivously i get error localhost:8000/php/script.php is not found on this server as php folder is above document root and in src folder so in such what can i do how can i fire ajax calls?

Re: access php script outside document root 80 80
Member Avatar

You can fire ajax calls to a handler php file which will accept ajax data and call functions from other php files above the docroot and return (echo) the response.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.