-1

Is there a way to run any php file from localhost ?

eg: I want to run files like file:///C:/Users/user/AppData/Local/myfile.php in http://localhost/myfile.php ,without copying the file to htdocs. basically I need to run all the .php files from apache.

is this possible ? I just need to simply open .php files from localhost (by double clicking) , I'm using a windows system.

1 Answers1

1

You could edit your document root in your apache configuration.

Or create a symlink to point to your preferred document root (on *nix):

$ sudo ln -s /path/to/your/project/pub /var/www

Assuming /var/www is your current document root. You'll need to move the original document root before creating the symlink.

$ sudo mv /var/www /var/www.bak
Progrock
  • 7,373
  • 1
  • 19
  • 25