T_CONSTANT_ENCAPSED_STRING error
| From: | Patrick Teague | Date: | Mon, 18 Mar 2002 00:37:06 +0000 |
| Subject: | T_CONSTANT_ENCAPSED_STRING error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-88862@lists.php.net to get a copy of this message | ||
I'm receiving "Parse error: parse error, expecting
`T_CONSTANT_ENCAPSED_STRING' in /host/plugged/index.php on line 3" error
when trying to require_once a couple of files.
top of index.php looks like so (line 3 is where I use $homeDir .
"/common/header.php")
<?php
require_once("homedir.php");
require_once($homeDir . "/common/header.php");
?>
contents of homedir.php is
<?php
if (getenv(SERVER_ADDR) == "127.0.0.1")
{
$homeDir = "C:/home/plugged";
}else{
// $homeDir = dirname(__FILE__);
$homeDir = "/home/plugged";
}
?>
As you can see I've tried 2 different things in the else statement, I've
even commented out the whole if statement leaving only the else statement &
it still bombs. This works perfectly well on my test server & it seemed to
be working just fine a couple days ago. Only thing that I can think of is
the fact that I added a couple other variables to homedir.php, but none have
anywhere near the same variable name as $homeDir. I'm not even sure what
the T_CONSTANT_ENCAPSED_STRING error is & I'm guessing it's an error or else
why would it stop my page from loading?
Patrick