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

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

报告相同问题?

悬赏问题

  • ¥60 在mc68335芯片上移植ucos ii 的成功工程文件
  • ¥15 笔记本外接显示器正常,但是笔记本屏幕黑屏
  • ¥15 Python pandas
  • ¥15 蓝牙硬件,可以用哪几种方法控制手机点击和滑动
  • ¥15 生物医学数据分析。基础课程就v经常唱课程舅成牛逼
  • ¥15 云环境云开发云函数对接微信商户中的分账功能
  • ¥15 空间转录组CRAD遇到问题
  • ¥20 materialstudio计算氢键脚本问题
  • ¥15 有没有代做有偿主要做数据可视化部分即可(2023全国高考更省一本线理科类)
  • ¥15 配置FPT报错,该如何处理