note 97388 rejected from function.is-file by degeberg
| From: | degeberg@php.net | Date: | Sat, 17 Apr 2010 09:49:33 +0000 |
| Subject: | note 97388 rejected from function.is-file by degeberg | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168341@lists.php.net to get a copy of this message | ||
Note Submitter: niltonbicalho at gmail dot com
----
Bug with "is_file" and "file_exists" commands!!!!!!!!!!
<?
$path_file = "my_dir/my_file.jpg";
if(is_file($path_file)){
echo "<BR>File Found<BR>";
}else{
echo "<BR>File not found<BR>";
}
class Test{
function test_file($file){
if(is_file($path_file)){
echo "<BR>File Found<BR>";
}else{
echo "<BR>File not found<BR>";
}
}
}
$test = new Test();
$test->test_file($path_file);
//Return 1 : File Found
//Return 2 : File not found
?>