Parse error: parse error, unexpected $end,大家帮忙解决,在线等...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<?
$str="襖";
echo $str;
?>
</body>
</html>
这是源代码
错误为:
Parse error: parse error, unexpected $end in d:\usr\www\html\string\bb.php on line 14
请问:
(1)那里错了?
(2)这是什么错误?
(3)如何才能改正错误?
谢谢!
问题点数:20、回复次数:4Top
1 楼mrshelly(Shelly)回复于 2006-06-04 21:01:41 得分 0
$str="襖 "; //后面加个空格就行了。Top
2 楼hbuxiaoshe(一天进步一点点)回复于 2006-06-04 22:12:14 得分 0
谢谢,不过这样的话,这个串的长度就+1了
要想与其他串比较的话,其他串也得在最后面加空格
不过,还可以接受,是个办法Top
3 楼swazn_yj(菩提本无树)回复于 2007-04-26 15:06:26 得分 0
PHP Parse Error: syntax error, unexpected $end 解决方法2007-02-09 11:12In PHP 5, the following error may appears as an error entry in Apache error log or simply displays on PHP web page, even if calling to php scripts with php_info() works perfectly and successfully returns information on PHP configurations:
Parse Error: syntax error, unexpected $end in ….. scripts.php on line …
The error may caused by a missing curly bracket in PHP script coding. Beside, it may also caused by error in PHP coding in class definition, as in PHP, a class definition cannot be broke up and distributed into multiple files, or into multiple PHP blocks, unless the break is within a method declaration.
But more commonly, the error is often caused by the use of Short Open tags in PHP,
To use short open tags, it must be enabled in PHP.INI. Search for short_open_tag in PHP.INI, and change the value to On. The line should look line:
short_open_tag = On
Top
4 楼iasky(iasky)回复于 2007-04-26 15:46:54 得分 0
襖这个字是什么编码的?Top




