Friday, December 14, 2018

html - Parse error: Syntax error, unexpected end of file in my PHP code




I got an error:



Parse error: syntax error, unexpected end of file in the line


With this code:





function login()
{
// Login function code
}
if (login())
{?>

Welcome Administrator


Upload Files


Edit Points Tally

else
{
echo "Incorrect login details. Please login";
}
?>
Some more HTML code




What's the problem?


Answer



You should avoid this (at the end of your code):



{?>


and this:






You shouldn't put brackets directly close to the open/close php tag, but it separate with a space:



{ ?>



also avoid and use


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...