douzi1117 2017-02-04 10:03
浏览 36
已采纳

升级php 5.3.3到5.6.30后包括不工作

I'd like to upgrade the version of PHP I'm using for my website. I'm currently using 5.3.3 and have managed to install 5.6.30 (so I can run better PHP code to do cooler things!).

When I switch over to 5.6 the include files on my pages don't work at all. When I look at the source code it shows the PHP code for the include instead of the code the include file should show.

For example it shows this in the page source:

<? include ("../bobs-house/new_website_top.php");?>

None of the includes work so I doubt it has anything to do with their contents.

I've tried using absolute file paths but that doesn't work.

I'm using Plesk v12.0.18 on CentOS 6.8 - I'm note sure what else you'll need to know.

Thanks in advance,

Jon

  • 写回答

1条回答 默认 最新

  • doudai8783 2017-02-04 10:14
    关注

    It appears you have a trouble with the short tag configuration If you don't want to change all of your code replacing <? ?> to <?php ?>, you can change php.ini in the line

    short_open_tag=On

    And restart Apache

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

报告相同问题?

悬赏问题

  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services