note 88386 added to function.file-exists
| From: | jnelson11 at gmail dot com | Date: | Wed, 21 Jan 2009 21:09:14 +0000 |
| Subject: | note 88386 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149620@lists.php.net to get a copy of this message | ||
I did some time tests and found this one to be the fastest function for checking url_exists
<?php
function file_exists_2($filePath)
{
return ($ch = curl_init($filePath)) ? @curl_close($ch) || true : false;
}
?>
Execution took 0.000093 seconds to complete.
----
Server IP: 208.69.120.35
Probable Submitter: 38.105.65.83
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master.php.net/note/edit/88386
Del: integrated -- https://master.php.net/note/delete/88386/integrated
Del: useless -- https://master.php.net/note/delete/88386/useless
Del: bad code -- https://master.php.net/note/delete/88386/bad+code
Del: spam -- https://master.php.net/note/delete/88386/spam
Del: non-english -- https://master.php.net/note/delete/88386/non-english
Del: in docs -- https://master.php.net/note/delete/88386/in+docs
Del: other reasons-- https://master.php.net/note/delete/88386
Reject -- https://master.php.net/note/reject/88386
Search -- https://master.php.net/manage/user-notes.php