首页 > 解决方案 > 初学者 Hello world php 错误

问题描述

我正在尝试让 hello world 程序在我学校的远程服务器上运行,但它没有显示任何内容并返回错误

<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

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

</body>
</html> 

这就是代码,服务器不断发回的错误是 ./hello.php: line 1: syntax error near unexpected token newline' and ./hello.php: line 1:' 该服务器运行 linux 和 perl。为什么服务器不运行这个程序?

标签: php

解决方案


推荐阅读