I am trying to find file_exist file in a directory. If I do not want to use another image. But since I use the file_exists function, it always returns false.
Code used
while($r=mysql_fetch_row($res)) { if(!file_exists('http://localhost/dropbox/lib/admin/'.$r[5])) { $file='http://localhost/dropbox/lib/admin/images/noimage.gif'; } else $file='http://localhost/dropbox/lib/admin/'.$r[5];}
But the function always returns false, even if the file exits. I checked this using
<img src="<?php echo 'http://localhost/dropbox/lib/admin/'.$r[5]; ?>" />
This displayed the image correctly.
Please help me
user1472277
source share