Need Help: {if problem=solved echo 'solved' else echo 'help'

Discussion in 'PHP' started by joshua91.sg, Jan 14, 2013.

  1. #1
    It goes straight to the file path instead of (my local websever-apache= xampp-) localhost/HTdocs/....
    even 127.0.0.1 doensn't work either.
    when trying to output php this is what I get== "file:///C:/xampp/htdocs/connect.php"
    {
    else
    }

    if I go to localhost/htdocs...connect.php

    object not found

    Error 404

    while it's there...any solution ??

    P.s I have that with ever code I try to runn..
    <?php

    echo 'Thanks in advance' ;
    ?>
    ?>
     
    Solved! View solution.
    joshua91.sg, Jan 14, 2013 IP
  2. king_cantona

    king_cantona Greenhorn

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    file:///C:/xampp/htdocs/ <- It's call "WWW root"

    You can put any file in here.

    Example
    file:///C:/xampp/htdocs/abc/index.php

    In web browser you can call http://localhost/abc/index.php
     
    king_cantona, Jan 14, 2013 IP
  3. joshua91.sg

    joshua91.sg Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I know but when I type in the browser: localhost/htdocs...connect.php I get a page saying forbidden 404 error..
     
    Last edited: Jan 14, 2013
    joshua91.sg, Jan 14, 2013 IP
  4. #4
    Thats because localhost/htdocs...connect.php is wrong, you just use http://localhost/connect.php

    htdocs is just a folder that stores your files, it is not part of your website or the urls
     
    MyVodaFone, Jan 14, 2013 IP