note 93572 modified in function.file-exists by thiago

From: Date: Wed, 16 Sep 2009 21:45:27 +0000
Subject: note 93572 modified in function.file-exists by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-160761@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: <?php 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. --was-- 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. http://php.net/manual/en/function.file-exists.php

« previous php.notes (#160761) next »