if_exist question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Knut Krueger

    if_exist question

    Hi together,
    I would like to test whether localhost ia on or off
    I tried to lacate a file

    Localhost: XAMPP with php [PHP: 5.0.4]

    $file="http://localhost/test_ob_localho st_online.html" ;
    if (file_exists($f ile)) echo("Localhost eingeschaltet") ;

    The path is ok I am able to open the file i the browser
    I tried also :
    $file="test_ob_ localhost_onlin e.html";
    if (file_exists($D OCUMENT_ROOT.$f ile))
    both are not working


    As I know is if_exists working on the local machine.
    Is it local from the php view, means at the server or local from the
    client view?
    Viele Grüße Knut
Working...