为什么IIS不执行我的站点root index.php文件的PHP代码? [英] Why isn't IIS executing the PHP code of my site root index.php file?
问题描述
IIS实际上是向浏览器发送<?php ...?>
代码而不是执行它。
IIS is literally sending <?php ... ?>
code to the browser rather then executing it.
但是,仅适用于根 http://domain.com/index.php
文件。
But, only for the root http://domain.com/index.php
file.
该文件夹中的所有其他.php文件和子文件夹中的index.php文件按预期执行。
All other .php files in that folder and index.php files in subfolders execute as expected.
如何执行我的root index.php代码?
How can I get my root index.php code to execute?
更新:index.php是我网站的默认文件......
Update: "index.php" is a Default Document of my Web Site...
替代文字http://img412.imageshack.us/img412 /4130/defaultdocumentmt9.gif
推荐答案
- IIS 5.1无法正常运行PHP根目录,但在所有其他文件夹中都很好
- 使用IIS在站点根目录中运行WordPress博客
- 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
- Problem with PHP Includes on IIS7
- PHP5 set-up - Relative paths for includes and other file references
更新:我找到了PHP 5和IIS 7的一些可能的解决方法。如果这些解决方案不起作用,请提供有关的更多详细信息index.php
,IIS设置,或尝试使用IIS 6兼容性。
UPDATED: I have found a few possible workarounds for PHP 5 and IIS 7. If those solutions are not working, please provide more details about your index.php
, IIS setup, or try to use IIS 6 compatibility.
这篇关于为什么IIS不执行我的站点root index.php文件的PHP代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!