【问题标题】:Php file not found on Windows hosting在 Windows 主机上找不到 PHP 文件
【发布时间】:2017-05-21 20:48:18
【问题描述】:

godaddy 上的 Windows 主机。

我有 4 个页面,主页是 Index.html,其余 3 个是 .php 页面。

当我上传 Index.php 文件时,该网站无法运行,但是当我将 Index.php 文件替换为 Index.html 时,该网站运行良好。

Index.php 文件有什么问题?

【问题讨论】:

标签: php html windows-hosting


【解决方案1】:

php 是以扩展开头的

<?php

只需将新文件作为 sample.php 并将此代码作为示例输入而不是测试

<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

<?php
echo "Hello World!";
?>

</body>
</html>

检查它是否正常工作,所以你的页面有问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-06-11
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    • 2011-03-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多