Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   PHP (https://www.askmehelpdesk.com/forumdisplay.php?f=454)
-   -   Path to local host (https://www.askmehelpdesk.com/showthread.php?t=36807)

  • Oct 12, 2006, 02:34 PM
    Jbert
    Path to local host
    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
  • Nov 7, 2006, 11:00 AM
    asterisk_man
    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!
  • Nov 7, 2006, 11:56 AM
    ScottGem
    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
  • Nov 7, 2006, 02:16 PM
    Jbert
    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.
  • Nov 13, 2006, 01:34 PM
    asterisk_man
    http://localhost/jbert/index.txt

  • All times are GMT -7. The time now is 07:28 AM.