note 37662 added to function.file-exists
| From: | sl___ at ___centricitysystems dot com | Date: | Sat, 22 Nov 2003 02:26:07 +0000 |
| Subject: | note 37662 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60801@lists.php.net to get a copy of this message | ||
Be careful, I just discovered (very difficultly), that passing a NULL or empty value as filename
returns TRUE on Windows 98.
$x = NULL; // also tested $x = ''; with same results
if ( file_exists($x) ) { echo 'good'; } else { echo 'bad'; }
Win98:: returns 'good'
Linux:: returns 'bad'
I tested on both Linux and Win98. Not sure what it returns on different Win OSes.
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37662
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37662&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37662&report=yes
Search -- http://master.php.net/manage/user-notes.php