note 77662 added to function.file-exists
| From: | guillermogomezruiz at gmail dot com | Date: | Fri, 07 Sep 2007 11:08:31 +0000 |
| Subject: | note 77662 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130287@lists.php.net to get a copy of this message | ||
I was having problems with the file_exists when using urls, so I made this function:
<?php
function file_exists_2($filePath)
{
return ($ch = curl_init($filePath)) ? @curl_close($ch) || true : false;
}
?>
Cheers!
----
Server IP: 130.206.1.5
Probable Submitter: 80.38.116.20
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master.php.net/note/edit/77662
Del: integrated -- https://master.php.net/note/delete/77662/integrated
Del: useless -- https://master.php.net/note/delete/77662/useless
Del: bad code -- https://master.php.net/note/delete/77662/bad+code
Del: spam -- https://master.php.net/note/delete/77662/spam
Del: non-english -- https://master.php.net/note/delete/77662/non-english
Del: in docs -- https://master.php.net/note/delete/77662/in+docs
Del: other reasons-- https://master.php.net/note/delete/77662
Reject -- https://master.php.net/note/reject/77662
Search -- https://master.php.net/manage/user-notes.php