Hello World php页面有404状态


Hello World php page has 404 status

我在index.php中有以下PHP代码:

<?php
echo 'Hello World';
?>

Hello World 打印在屏幕上,但状态代码为 404。如您所见,没有 header() 函数。我已经看过php.ini和LightTPD配置文件,但一切似乎都很好。我在FastCGI中运行Windows和PHP的LightTPD。此问题的可能原因是什么?

你认为文件在哪里,它就不存在。您是否能够导航到同一目录中的 html 文件?404不是"该页面在php中未正确呈现"消息,而是"我根本找不到该文件"消息