note 76545 added to function.file-exists

From: Date: Thu, 19 Jul 2007 21:48:03 +0000
Subject: note 76545 added to function.file-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-128747@lists.php.net to get a copy of this message
Small error in florinel2k's example $sourcePath should be $fileUrl, otherwise it works well for me. //Corrected This is an example if you want to know that a file exists (if that file isn't on your server): $fileUrl = "http://www.examplecom/test.jpg"; $AgetHeaders = @get_headers($fileUrl); if (preg_match("|200|", $AgetHeaders[0])) { // file exists } else { // file doesn't exists } ---- Server IP: 208.69.120.35 Probable Submitter: 209.194.189.187 ---- Manual Page -- http://www.php.net/manual/en/function.file-exists.php Edit -- https://master.php.net/note/edit/76545 Del: integrated -- https://master.php.net/note/delete/76545/integrated Del: useless -- https://master.php.net/note/delete/76545/useless Del: bad code -- https://master.php.net/note/delete/76545/bad+code Del: spam -- https://master.php.net/note/delete/76545/spam Del: non-english -- https://master.php.net/note/delete/76545/non-english Del: in docs -- https://master.php.net/note/delete/76545/in+docs Del: other reasons-- https://master.php.net/note/delete/76545 Reject -- https://master.php.net/note/reject/76545 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128747) next »