Question:
php Parse error I get, I cannot see what I am doing wrong?
tdub
2007-08-24 06:56:15 UTC
Okay, first off, to make the upkeep of a site a little nicer, I like to use php's include (and also echo file_get_contents because I hear it is a little bit faster than include)
The error I am getting is:
Parse error: syntax error, unexpected T_STRING in /home/lamastr4/public_html/spanishlanguagesite/header.php on line 1

basically I have http://pastebin.com/m6426913 (my template.php page which calls the header/footer/etc)
then it seems to be having trouble with my header.php file here:
http://pastebin.com/m31357628
I don't know of any debuggers for php where I can step thru it line by line. Anyone see what my mistake is that is causing this error? I am totally stumped right now. Thanks.
Three answers:
hagakure
2007-08-24 15:37:29 UTC
The xml statement should only cause a problem if you have short tags enabled in the php configuration file (php.ini).

If you don't have access to modify the php.ini file directly then you can use the ini_set() function to turn the short tags off
nzseries1
2007-08-24 07:04:34 UTC
You have on the first line:







The


Just remove the bit I wrote above from line 1.
Roop
2007-08-27 03:25:41 UTC
hi



Problem in single quote ' & double quote " integration.



Double check your code



Thanks

Roopesh


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...