note 89403 added to function.file-exists
| From: | alexpechkarev at yahoo dot co dot uk | Date: | Fri, 06 Mar 2009 12:28:49 +0000 |
| Subject: | note 89403 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-151548@lists.php.net to get a copy of this message | ||
file_exists() function return FALSE for files inaccessible due to safe mode restrictions.
Here is the way to walk around and check if file exists on the server:
<?php
if( exec('ls -l images/ | grep image.jpg)){
echo "<img src='http://www.myaddress/images/image1.jpg'>";
}else{
echo "No IMAGE";
}
----
Server IP: 92.48.74.199
Probable Submitter: 212.188.174.98
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master.php.net/note/edit/89403
Del: integrated -- https://master.php.net/note/delete/89403/integrated
Del: useless -- https://master.php.net/note/delete/89403/useless
Del: bad code -- https://master.php.net/note/delete/89403/bad+code
Del: spam -- https://master.php.net/note/delete/89403/spam
Del: non-english -- https://master.php.net/note/delete/89403/non-english
Del: in docs -- https://master.php.net/note/delete/89403/in+docs
Del: other reasons-- https://master.php.net/note/delete/89403
Reject -- https://master.php.net/note/reject/89403
Search -- https://master.php.net/manage/user-notes.php