note 93572 added to function.file-exists

From: Date: Wed, 16 Sep 2009 20:54:56 +0000
Subject: note 93572 added to function.file-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-160758@lists.php.net to get a copy of this message
You could use document root to be on the safer side because the function does not take relative paths: if( file_exists( $_SERVER{'DOCUMENT_ROOT'} . "/my_images/abc.jpg")) { ... } Do not forget to put the slash '/', e.g. my doc root in Ubuntu is /var/www without the slash. ---- Server IP: 64.71.164.2 Probable Submitter: 76.101.190.113 ---- Manual Page -- http://www.php.net/manual/en/function.file-exists.php Edit -- https://master.php.net/note/edit/93572 Del: integrated -- https://master.php.net/note/delete/93572/integrated Del: useless -- https://master.php.net/note/delete/93572/useless Del: bad code -- https://master.php.net/note/delete/93572/bad+code Del: spam -- https://master.php.net/note/delete/93572/spam Del: non-english -- https://master.php.net/note/delete/93572/non-english Del: in docs -- https://master.php.net/note/delete/93572/in+docs Del: other reasons-- https://master.php.net/note/delete/93572 Reject -- https://master.php.net/note/reject/93572 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160758) next »