4

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:\?.

007mrviper
  • 459
  • 4
  • 20

2 Answers2

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
  • 1
    If 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
  • 1
    Follow 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
  • thank you,i solve this problem. – vinnaithandi varuvaya Sep 13 '12 at 04:27
3

This tutorial will guide step by step through this operation.

http://mattots.blogspot.com/2009/10/changing-document-root-in-xampp.html