Parse error:syntax error, unexpected $end in script.php on line xx
After debugging for a while, found that the line that produced the error is a row in the middle of the file
$str. = ">\n";
Think of it. The end tag allowed by the PHP interpreter can also be annotated with a single line, i.e.//$str. = ">\n"; is interpreted as having a comment before the end tag, the content of the comment is//$str. = ", and \ n" After?>; will be interpreted as content outside of the PHP block as HTML output out! The result is to $str. = ">\n"; This line adds//comments, instead of a?> end tag, causing the original end tag to be unexpected (unexpected).
The solution is to simply delete the line.
PHP start and end tags in the line do not write anything else, is a good habit.
http://www.bkjia.com/PHPjc/319614.html www.bkjia.com true http://www.bkjia.com/PHPjc/319614.html techarticle Parse error:syntax Error, unexpected $end in script.php the line xx after debugging a while to find that the row that produced the error is a row in the middle of the file//$str. = "\ n"; Think of it. PHP explanation Allow the ...