Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run php file from other location? [closed]

I have installed my XAMPP in C drive, normally, I save the file in this location C:\xampp\htdocs and run it as localhost/example.php. If I change my project folder to E:\project\example.php, what are the settings that need to be altered in XAMPP to run the file from other saved location other than C:\?.

like image 706
vinnaithandi varuvaya Avatar asked Oct 26 '25 04:10

vinnaithandi varuvaya


1 Answers

You can relocate your project by editing the DocumentRoot entry in XAMPP\apache\conf\httpd.conf. There, you have to replace the line DocumentRoot C:\xampp\htdocs\

With:

DocumentRoot E:\Project\