By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,203 Members | 1,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,203 IT Pros & Developers. It's quick & easy.

if_exist question

P: n/a
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_localhost_online.html";
if (file_exists($file)) echo("Localhost eingeschaltet");

The path is ok I am able to open the file i the browser
I tried also :
$file="test_ob_localhost_online.html";
if (file_exists($DOCUMENT_ROOT.$file))
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 Gre Knut
May 29 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.