doujiaochan7317 2015-10-05 16:21 采纳率: 0%
浏览 42

变量php的内容在传递到5.2-.5.3到5.4+ php版本时隐藏

i have a web site build some years ago, this site for more time is hosted on server with php 5.2, now i have decided to upgrade the server , the configuaration of new server is

-Centos -php 5.4.16 -apache 2.4

when move the site on new server , every work fine but some output of variable not work , in this variable is present some code and some special caracther example ("?:.).

in new site the output of this variable is not printed , th code is this :

<?php

include_once "/opt/bitnami/apache2/htdocs/inc/settings/list.php";

echo $_form['list']['two'];
?>

in this page (list.php) is present this code:

http://pastebin.com/egVE9ff0

i tried to insert in this variable a text example and work fine , i tried number and work fine, i tried the DOT and work fine, so the problem is conflict between 2+ element in in this code.

in a server with php 5.2-5.3 work fine, in a server with 5.4.16-5.5 not work

the problem is , not show the output. the source code is full white.

  • 写回答

1条回答 默认 最新

  • dongni9825 2015-10-05 16:27
    关注

    Having a look at your code:

    <?
    
    $_form['list']['two'] = "
    ciao INFORMATIVA IN BASE ALL'ART. 13 D. LGS. 196/2003
    ...
    

    The problem is that newer version of PHP don't (by default) support <? a.k.a short_open_tag.

    The easiest way to fix it is to change <? to <?php:

    <?php
    
    $_form['list']['two'] = "
    ciao INFORMATIVA IN BASE ALL'ART. 13 D. LGS. 196/2003
    ...
    
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料