Bug #16150 Updated: include_once Broken?
| From: | dcourey at wizardcomputer dot com | Date: | Tue, 19 Mar 2002 17:01:21 +0000 |
| Subject: | Bug #16150 Updated: include_once Broken? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-2891@lists.php.net to get a copy of this message | ||
ID: 16150
Updated by: dcourey@wizardcomputer.com
Reported By: dcourey@wizardcomputer.com
Status: Open
Bug Type: Scripting Engine problem
Operating System: Apache/1.3.23 (Unix) PHP/4.1.2 m
PHP Version: 4.1.2
New Comment:
Well, actually we are not retrieving data from a remote file, we are
executing external script (which I believe is the primary purpose of
"include_once"). The full qualified URL simply circumvents the relative
path issues!!
Previous Comments:
------------------------------------------------------------------------
[2002-03-19 10:55:14] sander@php.net
Sorry, I misread the report.
include_once() shouldn't open and include the file twice.
Anyway, you shouldn't use include_once to grab data from a remote file,
use fopen() & co for that.
------------------------------------------------------------------------
[2002-03-19 04:17:19] sander@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
------------------------------------------------------------------------
[2002-03-18 13:30:02] dcourey@wizardcomputer.com
It seems that the "include_once" function no longer works?
<?php
include_once("http://www.mySite.com/getUserID");
include_once("http://www.mySite.com/getUserID");
?>
"getUserID" contains something to the effect of...
<?php
function getID()
{
//create empty array
$id = array();
.......
return ($id);
}
?>
Upon execution of the second "include_once" you'll receive an
error....
Fatal error: Cannot redeclare getID() in
http://www.mySite.com/getUserID on line 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16150&edit=1