drzbc6003 2014-02-23 03:17
浏览 58
已采纳

从PHP 5.2.3到5.3.27的哪些变化会使相同的代码出现语法错误? [关闭]

What change from PHP version 5.2.3 to 5.3.27 would make same code give syntax error? I have a PHP code which while it's fine on 5.2.3 it doesn't work on 5.3.27 and give the following error in the last line of code:

( ! ) Parse error: syntax error, unexpected $end in index.php on line 832

It doesn't make any sense to me but I don't do PHP coding a lot of time. My question is if there's some syntax change or something like this which would make the syntax error. Also, I'm using different servers Appserver and Vertrigo, if it's relevant.

EDIT:

In fact, the parser says that the error is on line 832 where the last line is 831. There's no extra } because if so it willn't run on the old version.

EDIT2:

Here's the last lines of code from actual program(it just doesn't work on recent PHP version):

<? } ?>

<?php 

mysql_close($link);

?>
  • 写回答

1条回答 默认 最新

  • doulu3865 2014-02-23 13:17
    关注

    Maybe it's a configuration change and short_open_tag is differently configured.

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

报告相同问题?

悬赏问题

  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比