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!

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

报告相同问题?

悬赏问题

  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。