CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  PHP

Parse error: parse error, unexpected $end,大家帮忙解决,在线等...

楼主hbuxiaoshe(一天进步一点点)2006-06-04 20:33:48 在 Web 开发 / PHP 提问

<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

相关问题

关键词

得分解答快速导航

  • 帖主:hbuxiaoshe

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo