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

解析错误:语法错误,第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
    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!

    点赞 评论

相关推荐