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

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

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效