#20723 [Bgs]: include self file
| From: | philip@php.net | Date: | Tue, 10 Dec 2002 08:54:23 +0000 |
| Subject: | #20723 [Bgs]: include self file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-27240@lists.php.net to get a copy of this message | ||
ID: 20723
Updated by: philip@php.net
Reported By: ionuta@infoiasi.ro
Status: Bogus
Bug Type: *General Issues
Operating System: Red Hat 7.2
PHP Version: 4.2.2
New Comment:
I'm not sure what expected behavior should be here but consider using
include_once().
On a related note: include 'idonotexist.php'; gives a confusing error
these days:
Warning: main(idonotexist.php) [function.main]: failed to create
stream: No such file or directory in /var/www/include.php on line 3
Warning: main() [function.main]: Failed opening 'idonotexist.php' for
inclusion (include_path='.:/usr/local/lib/php') in /var/www/include.php
on line 3
A lot of people are going to find themselves here:
http://www.php.net/function.main
;)
Previous Comments:
------------------------------------------------------------------------
[2002-12-10 01:25:04] gali@email.ro
it is a bug
------------------------------------------------------------------------
[2002-11-29 06:51:10] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2002-11-29 06:50:29] ionuta@infoiasi.ro
script.php
<?php
echo "hello\n";
include("script.php");
?>
if you try this you will get:
hello
hello
hello
...
and the script will failure
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20723&edit=1