加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

为什么IIS不执行我的站点root index.php文件的PHP代码?

发布时间:2020-12-13 23:54:53 所属栏目:Linux 来源:网络整理
导读:IIS实际上是发送?php ...?代码到浏览器而不是执行它. 但是,仅适用于根http://domain.com/index.php文件. 该文件夹中的所有其他.php文件和子文件夹中的index.php文件按预期执行. 如何让我的root index.php代码执行? 更新:“index.php”是我网站的默认文档
IIS实际上是发送<?php ...?>代码到浏览器而不是执行它.

但是,仅适用于根http://domain.com/index.php文件.

该文件夹中的所有其他.php文件和子文件夹中的index.php文件按预期执行.

如何让我的root index.php代码执行?

更新:“index.php”是我网站的默认文档…

alt text http://img412.imageshack.us/img412/4130/defaultdocumentmt9.gif

解决方法

> IIS 5.1 does not run PHP properly under root directory,but fine in all other folders
> Running a WordPress blog in site root using IIS

更新:我找到了PHP 5和IIS 7的一些可能的解决方法.如果这些解决方案不起作用,请提供有关index.php,IIS设置或尝试使用IIS 6兼容性的更多详细信息.

> Problem with PHP Includes on IIS7
> PHP5 set-up – Relative paths for includes and other file references

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读