【发布时间】:2011-08-26 16:36:40
【问题描述】:
这是一个"Hello, World" 代码 sn-p。我尝试使用XAMPP 运行它,我正在使用Dreamweaver 编写代码。执行后,页面不显示“Hello, World!”。出了什么问题?
<!DOCTYPE html>
<head>
<title>Hello World | Hello and Welcome</title>
</head>
<body>
<?php
Echo "Hello, World!";
?>
</body>
</html>
【问题讨论】:
-
是不是叫做something.php?你检查过你的网络服务器错误日志吗?
-
对我来说,这段代码运行。可能是服务器配置错误。
-
那么,你看到了什么?只有标题?你确定你从 localhost 正确运行它吗?
-
@Rikudo:是的,只是标题和空白页。我不确定配置,但 Xampp 运行良好。
-
@JustAnotherProgrammer 然后将其重命名为 index.php - 通常,出于性能原因,.html 文件不会绑定到 php-handler。
标签: php