From:             [EMAIL PROTECTED]
Operating system: Linux RedHat 7.2
PHP version:      4.2.3
PHP Bug Type:     Filesystem function related
Bug description:  file_exists() doesn't work normally

file_exists() function returns false on the relative path to the file,
which is REALLY exists. But its working well if the path is absolute.
code sample:

$filename = "./template/sub/install.txt";
if (!file_exists($filename))
{
 $fd = fopen ($filename, "r");
 $contents = fread ($fd, filesize ($filename));
 fclose ($fd);

 die("Error - file $filename does not exist.\n $contents");
}

try it, and marvel.
why?
PS In the documentation say nothing about types of path.
-- 
Edit bug report at http://bugs.php.net/?id=20710&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20710&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20710&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20710&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20710&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20710&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20710&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20710&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20710&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20710&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20710&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20710&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20710&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20710&r=isapi

Reply via email to