当前位置:首页 > 服务器技术 > IIS

为什么IIS不执行我的站点root index.php文件的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


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!