require_once variable problems?
| From: | Shawn Esplin | Date: | Thu, 09 Nov 2000 18:45:37 +0000 |
| Subject: | require_once variable problems? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24536@lists.php.net to get a copy of this message | ||
I hope someone can tell us what the problem here is, and hopefully how to
fix it...
require_once gives an error, but the exact same string in require, include,
or include_once works! Is this an error in PHP, or is require_once not
supposed to do this for some reason?
<?php
require_once("$DOCUMENT_ROOT/include/DatabaseBox.php");
//require("$DOCUMENT_ROOT/include/DatabaseBox.php");
//include_once("$DOCUMENT_ROOT/include/DatabaseBox.php");
//include("$DOCUMENT_ROOT/include/DatabaseBox.php");
?>
Parse error: parse error, expecting `T_CONSTANT_ENCAPSED_STRING' in
/home/kdotson/pets/reqiretest.php on line 2
We tried putting everything into a variable before requiring it too, and
that also failed.
We're running PHP Version 4.0.2, and will download 4.0.3pl1, but we doubt
that will fix it since we didn't see anything in the changelog about fixing
a problem of this type.
Thanks,
Shawn