ID:               6932
 Comment by:       rhoelvis-bell at yahoo dot com
 Reported By:      richard dot heyes at heyes-computing dot net
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Any
 PHP Version:      4.0.2
 New Comment:

I just think would be great to check before we get any kind of warning
or whatever. And I also think would be of great importance to offer a
clean code and service.


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

[2006-03-10 02:34:09] admin at microsoft dot com

FIX THIS ASAP PLZ !!!
IS IMPORTANT !!!

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

[2006-03-08 16:41:34] ericjhollander at yahoo dot com

This is so obvious.  It should be there.  We should be able to do an
easy test BEFORE calling include().

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

[2006-02-24 22:38:22] arnold at bean-it dot nl

I third that!
And I would also like to see this argument for the function
'is_readable' and 'is_writable'.

Currently there is no clean way to check if a file can be included.
Simply including a file which can't be opened causes a warning to be
triggered. Suppressing include() with an @ is not advisable, since
parse errors won't be displayed, but will cause the script to die,
causing a blank screen. (Happy debugging, hope you're using
ZendStudio).

The best solution I've come up with is:
if (($fp = @fopen($filename, 'r', 1)) and fclose($fp))
include_once($filename);

Anybody reading this bug PLEASE VOTE that this is important to you,
because it doesn't look like anybody is willing to add this (simple)
feature.

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

[2005-06-30 19:15:44] sr at brightlight dot ch

I second this request.
Open since 5 years, since PHP5's autoload even more important 
and not even yet assigned... :-/

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

[2002-06-04 09:13:56] [EMAIL PROTECTED]

Any objection not to add this?

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/6932

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

Reply via email to