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:\?.
Asked
Active
Viewed 1.0k times
4
-
You could even try to look it up in apaches documentation – Gerald Schneider Sep 12 '12 at 06:26
-
1Same as http://stackoverflow.com/questions/1408/make-xampp-apache-serve-file-outside-of-htdocs – Kai Mattern Sep 12 '12 at 06:27
-
so why dont you just reinstall it in e drive – NullPoiиteя Sep 12 '12 at 06:28
-
this belongs on server fault, since it's not a programming question. – Ben Rowe Sep 12 '12 at 06:42
2 Answers
6
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\
-
I also change the information,but i going to browser and enter the localhost/project/index.php it only show in html type(ex:the index.php file show the browser).but does not run the index.php.how to solve plz help........thank you.... – vinnaithandi varuvaya Sep 12 '12 at 06:35
-
1If the document root is set to E:/project/, when you type the URL in your browser you have to type : http://localhost/example.php, because the root is not in E:/ is in E:/project – Sep 12 '12 at 06:39
-
already i change the all possible,but they can't be worked,what are the procedure change the directory.plz tell me step by step.I change the DocumentRoot "E:/project".and run in localhost/index.php.But they can't find out the location.it will be show on object not found in the file error. – vinnaithandi varuvaya Sep 12 '12 at 09:15
-
1Follow this tutorial. Thus will help you certainly. http://mattots.blogspot.com/2009/10/changing-document-root-in-xampp.html – Sep 12 '12 at 09:20
-
3
This tutorial will guide step by step through this operation.
http://mattots.blogspot.com/2009/10/changing-document-root-in-xampp.html