note 22094 deleted from function.file-exists by jimw
| From: | jimw@php.net | Date: | Tue, 02 Jul 2002 16:27:24 +0000 |
| Subject: | note 22094 deleted from function.file-exists by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-32508@lists.php.net to get a copy of this message | ||
I found a slight issue when trying to check if a variable name as a directory then variable name as
a file existed.
I was using file_exists('$section/$id.inc.php'); which it didn't seem to like, kept
returning false even though i knew that the file did exist.
A way around this seems to be to try say $somevar = "$section/$id.inc.php";
then do if(file_exists('$somevar')) {
echo "yes"
} else {
echo "no";
};
This seem'd to work.
hope this helps