Run php page from any location on Localhost

As you know, If you want to run php pages using Xampp, You have to put your php pages under
htdocs folder.

But this is not necessary. You can put your files anywhere in your system.
Follow these steps to make this thing working:

If you are using Xampp

1. Open Xampp Control Panel, Click on "Config" button.

2. Then Click "Apache(httpd.conf)". A notepad will open.

If you are using Wamp

1. Goto apache --->  conf

2. Open "httpd.conf" with Notepad


3. Under this notepad, search for the term "DocumentRoot"

    You will see following line:
          
           DocumentRoot "C:/xampp/htdocs"
          <Directory "C:/xampp/htdocs">

4. Replace Red colored text with your desired path.

Now you can put your files under your desired path and you can run it successfully.

That's it.
0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment