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.

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

报告相同问题?