VVV Mars VG
12-02-2009, 06:36 PM
I have this statement
<?php
if (strpos ($_SERVER["PHP_SELF"],'showthread.php')!==false) {
echo "Thread";
} else {
echo "Something else";
}
?>
I don't have much experience with PHP so when I first came up against an error I switched over to using a stand alone file outside of vbulletin but still in the same directory and it worked fine.
This is the error I'm getting
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in XXXX/forum/includes/adminfunctions_template.php(3939) : eval()'d code on line 16
Does anyone know why this doesn't work within vbulletin? And perhaps what I should be doing instead.
Thanks.
<?php
if (strpos ($_SERVER["PHP_SELF"],'showthread.php')!==false) {
echo "Thread";
} else {
echo "Something else";
}
?>
I don't have much experience with PHP so when I first came up against an error I switched over to using a stand alone file outside of vbulletin but still in the same directory and it worked fine.
This is the error I'm getting
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in XXXX/forum/includes/adminfunctions_template.php(3939) : eval()'d code on line 16
Does anyone know why this doesn't work within vbulletin? And perhaps what I should be doing instead.
Thanks.