Log in

View Full Version : Path to local host


Jbert
Oct 12, 2006, 02:34 PM
A new area for me for sure. Some has made a PHP page for me to lookat. The file was index.txt. He said I had to install the apache server to correctly look at it. I did and it says installed correctly. When I type in http://localhost I get the opening page, but for the life of me I can not get the right path to my file.

Here is the directory in htdocs for the index file.

C:\Program Files\xampp\htdocs\index.txt

I realize I had to put the http://localhost/ first. Would someone please school me here. I am anxious to see the php difference
And I tried a million thigs to get it right.

Thanks


Jim

asterisk_man
Nov 7, 2006, 11:00 AM
First, I don't think the default install of apache comes with php. Are you sure you have php installed?

Second, php files usually look like index.php, not index.txt. Are you sure you shouldn't rename your file to index.php?

Third, if you have php installed and you're really sure that index.txt is what you want, try http://localhost/index.txt

Hope this helps!

ScottGem
Nov 7, 2006, 11:56 AM
Not sure about Apache, but generally a folder on the server is designated as the WEB root. If your page file is in that folder you just need to use http://localhost/index.txt.

However, if the page is in a subfolder, you add the path after localhost. For example:

http:\\localhost\xampp\htdocs\index.txt

Jbert
Nov 7, 2006, 02:16 PM
Thanks for both replies. Here is the correct path to the apache and the .php page

http://localhost/jbert

Jbert being the directory name that holds the .php file.

asterisk_man
Nov 13, 2006, 01:34 PM
http://localhost/jbert/index.txt