Parse error: syntax error, unexpected end of file in line 179 (file doesn't have so many lines)

Parse error: syntax error, unexpected end of file in line 179 (file doesn't have so many lines)

我在执行只有 177 行的 .php 文件时收到错误消息。

背景:这是一个 Wordperfect-Install,同一页面对其他记录执行良好,但在导致问题的记录中,我正在演示一些新的短代码。我在这些开发中犯错的可能性不大,但这都是在 "crashing" 文件之外完成的,所以我想知道为什么它会出现在那里(并且有这样一个奇怪的行号。)而不是在我修改的来源...

wp-config.php中,我设置了define('WP_DEBUG', true);

P.S: 确切的错误信息是:

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

好的,在开发人员的帮助下,我找到了解决方案:编写原始代码的人在 PHP '<?' 中使用了简短的开始标签,显然支持这些需求在 PHP.INI 中启用(我没有这样做,因为我不喜欢它们)。因此,将所有标签更新为 "decent PHP" 后,错误消失了!