duanji9677 2014-09-22 17:32
浏览 30
已采纳

PHP停止解析

I just switched servers to a server running PHP Version 5.5.9 and Nginx and in the middle of the php code being parsed is this code:

$this_page_cats = array ("Examples<br>& Solutions");

On this new server, php stops parsing at the '>' in the '<br>' above instead of waiting until the '?>' that truly ends the code. I assume there's some simple configuration directive that would correct the problem but I can't seem to find it Googling around.

Thanks!

  • 写回答

1条回答 默认 最新

  • donglang7236 2014-09-22 17:53
    关注

    It's not PHP stopping parsing, it's PHP not being parsed at all:

    e.g. with PHP not working properly, your PHP code is going out to the user's browser AS-IS:

    <?php
    ^---start of unknown HTML tag
    $this_page_cats = array ("Examples<br>& Solutions");
                                         ^---end of unknown HTML tag
    

    Do a "view source" and you'll probably see ALL of your php code.

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

报告相同问题?

悬赏问题

  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行