Parse error: syntax error, unexpected T_STRING in /home/....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
newbtophp
Forum Newbie
Posts: 3
Joined: Wed May 27, 2009 12:01 pm

Parse error: syntax error, unexpected T_STRING in /home/....

Post by newbtophp »

I get this error when accessing index.php

"Parse error: syntax error, unexpected T_STRING in /home/dechost/public_html/index.php on line 2"

My line 2:

Code: Select all

define('CRACK_ROOT',dirname(__FILE__ ? __FILE__ : getenv('SCRIPT_FILENAME')));
Can anyone help?

Thanks
Last edited by Benjamin on Wed May 27, 2009 12:16 pm, edited 1 time in total.
Reason: Added [code=php] tags.
anand
Forum Commoner
Posts: 80
Joined: Fri May 22, 2009 11:07 am
Location: India
Contact:

Re: Parse error: syntax error, unexpected T_STRING in /home/....

Post by anand »

newbtophp wrote:I get this error when accessing index.php

"Parse error: syntax error, unexpected T_STRING in /home/dechost/public_html/index.php on line 2"

My line 2:

Code: Select all

define('CRACK_ROOT',dirname(__FILE__ ? __FILE__ : getenv('SCRIPT_FILENAME')));
Can anyone help?

Thanks
Did you add an ; in previous line?
newbtophp
Forum Newbie
Posts: 3
Joined: Wed May 27, 2009 12:01 pm

Re: Parse error: syntax error, unexpected T_STRING in /home/....

Post by newbtophp »

anand wrote:
newbtophp wrote:I get this error when accessing index.php

"Parse error: syntax error, unexpected T_STRING in /home/dechost/public_html/index.php on line 2"

My line 2:

Code: Select all

define('CRACK_ROOT',dirname(__FILE__ ? __FILE__ : getenv('SCRIPT_FILENAME')));
Can anyone help?

Thanks
Did you add an ; in previous line?
Problem Solved. Thanks! :)
anand
Forum Commoner
Posts: 80
Joined: Fri May 22, 2009 11:07 am
Location: India
Contact:

Re: Parse error: syntax error, unexpected T_STRING in /home/....

Post by anand »

newbtophp wrote: Problem Solved. Thanks! :)
Welcome.
Post Reply