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!

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

报告相同问题?

悬赏问题

  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器