ID:               11793
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Redhat Linux
 PHP Version:      4.0.6
 New Comment:

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. :)


Previous Comments:
------------------------------------------------------------------------

[2001-06-29 04:51:07] [EMAIL PROTECTED]

This was not a PHP problem.

------------------------------------------------------------------------

[2001-06-29 03:09:36] [EMAIL PROTECTED]

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();


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=11793&edit=1

Reply via email to