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 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化