dongtang6775 2015-05-08 09:46
浏览 65
已采纳

解析错误:语法错误,第179行意外结束文件(文件没有这么多行)[关闭]

I'm getting the error-message while executing a .php-file which has just 177 lines.

Background: this is a Wordperfect-Install, that same page executes fine for other records, but in the record which causes issues, I'm demo-ing some new shortcodes. It is not unlikely that I made a fault in these developments, but that is all done outside of the "crashing" file, so I wonder why it would appear there (and with such a strange line-no.) and not in the source that I modified...

In wp-config.php, I have set define('WP_DEBUG', true);

P.S: The exact error msg is:

Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\wp-content\themes\mytheme\single-record.php on line 179
  • 写回答

1条回答 默认 最新

  • duanguangwang5829 2015-05-08 14:28
    关注

    Ok, with the help of fellow dev I found the solution: the guy who wrote the original code had used the short opening tags in PHP '<?' and apparently support for these needs to be enabled in the PHP.INI (which I had not done, 'coz I do not like them). So, after updating all tags to "decent PHP", the error is gone!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥60 请查询全国几个煤炭大省近十年的煤炭铁路及公路的货物周转量
  • ¥15 请帮我看看我这道c语言题到底漏了哪种情况吧!
  • ¥66 如何制作支付宝扫码跳转到发红包界面
  • ¥15 pnpm 下载element-plus
  • ¥15 解决编写PyDracula时遇到的问题
  • ¥15 有没有人能解决下这个问题吗,本人不会编程
  • ¥15 plotBAPC画图出错
  • ¥30 关于#opencv#的问题:使用大疆无人机拍摄水稻田间图像,拼接成tif图片,用什么方法可以识别并框选出水稻作物行
  • ¥15 Python卡尔曼滤波融合
  • ¥20 iOS绕地区网络检测