<? 空格 ?>这样 OK?

解决方案 »

  1.   

    不知道你的配置里面短标签打开了没有?我有一次就是没有打开,所以只能用<?php ?>!
      

  2.   

    给你找了下php.ini里面的设置:你看下吧; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.  
    ; NOTE: Using short tags should be avoided when developing applications or
    ; libraries that are meant for redistribution, or deployment on PHP
    ; servers which are not under your control, because short tags may not
    ; be supported on the target server. For portable, redistributable code,
    ; be sure not to use short tags.
    short_open_tag = On这里说的很明白了,你只要把短标签打开,就能支持<? ?>了
      

  3.   

    php.ini中的设置short_open_tag = On
      

  4.   

    建议养成好习惯,不要用<? ... ?>这种写法。