PHPsyntaxerror and unexpected $ end are one of the reasons for the error and solutions. Parseerror: syntaxerror, unexpected $ endinscript. phponlinexx after debugging for a while, it is found that the row that produces the error is a line in the middle of the file $ str .? N; think of the Parse error: syntax error, unexpected $ end in script. PHP on line xx allowed by the php interpreter.
After debugging for a while, it is found that the line that produces the error is a line in the middle of the file.
// $ Str. = "?> \ N ";
Think of the line that the PHP interpreter allows to end with a single line comment, that is, // $ str. = "?> \ N "; is interpreted as a comment before the end mark. the comment content is // $ str. =", and?> \ N "; will be interpreted as HTML output for content outside the PHP block! The result is $ str. = "?> \ N "; after this line is added/annotated, there will be more?> The end mark of, resulting in the original real end mark as unexpected (unexpected.
The solution is to delete this line directly.
It is a good habit to write other things in the row where the PHP start and end tags are located.
Http://www.bkjia.com/PHPjc/319614.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/319614.htmlTechArticleParse error: syntax error, unexpected $ end in script. php on line xx after debugging for a while, the line that produces the error is a line in the middle of the file // $ str. = "? \ N "; remembered what the PHP interpreter allowed...