|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-06-29 03:09 UTC] bf at ez dot no
I'm having problem with file_exists(), is_file(), file_size() since the upgrade to 4.0.6. It does not work if I supply a variable as a filename. E.g. file_exists( $var ); will return false even if the variable contains a correct path. file_exists( "path/to/file.txt" ); works. Same for the is_file() and file_size(); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
I was having trouble with the following code: $date = `date "+%d-%b-%Y"`; $data_file = "data/" . $date; rtrim($data_file); # $data_file = rtrim($data_file); clearstatcache(); if( file_exists($data_file) ) { $curr_data = "yes"; } else { $curr_data = "no"; } For the record the solution was to change the "rtrim" line to the one I have commented out. I was thinking in perl. :)