PHP 4.0 Bug #6814: Error from require_once when path contains a php variable like $DOCUMENT_ROOT
| From: | tep at sportbug dot net | Date: | Wed, 20 Sep 2000 13:37:04 +0000 |
| Subject: | PHP 4.0 Bug #6814: Error from require_once when path contains a php variable like $DOCUMENT_ROOT | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33572@lists.php.net to get a copy of this message | ||
From: tep@sportbug.net
Operating system: Linux RH 6.2
PHP version: 4.0.2
PHP Bug Type: Filesystem function related
Bug description: Error from require_once when path contains a php variable like $DOCUMENT_ROOT
The following code :
<?php
$test = "";
require_once($test."test.inc");
?>
where test.inc is just:
<?php
echo "HERE";
?>
produces this error when run:
Parse error: parse error, expecting `T_CONSTANT_ENCAPSED_STRING'
..... on line 3
If you removing the $test varible or change the function require_once() to require(), include(), or
include_once(), the error goes away.
Not sure if this is the intended.
Using PHP 4.0.2 (not the latest snap shot) on Red Hat 6.2 with Apache.
Tim Pfafman