Bug #14741 Updated: is_file returns an error rather than if a file exists or not
| From: | mfischer@php.net | Date: | Fri, 28 Dec 2001 18:31:37 +0000 |
| Subject: | Bug #14741 Updated: is_file returns an error rather than if a file exists or not | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-75212@lists.php.net to get a copy of this message | ||
ID: 14741
Updated by: mfischer
Reported By: watford@uiuc.edu
Old Status: Open
Status: Closed
Bug Type: Filesystem function related
Operating System: FreeBSD 4.3
PHP Version: 4.1.0
New Comment:
This has been fixed in 4.1.1 . Closing.
Previous Comments:
------------------------------------------------------------------------
[2001-12-28 13:14:08] watford@uiuc.edu
<?php
if(is_file($_GET['file'].".php")) {
include($_GET['file'].".php"); }
elseif(is_file($_GET['focus'].".inc")) {
virtual($_GET['focus'].".inc"); }
else { virtual("news/news.inc"); }
?>
That code throws this error:
Warning: stat failed for .php (errno=2 - No such file or directory) in
/usr/home/edgewww/helpandsupport.net/cs/htdocs/index.php on line 39
Warning: stat failed for .inc (errno=2 - No such file or directory) in
/usr/home/edgewww/helpandsupport.net/cs/htdocs/index.php on line 40
I've corrected this issue by using file_exists but for the sake of not having to change my
backend, I'd love for is_file to start working again.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14741&edit=1