php - 初学者 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。为什么服务器不运行这个程序?
解决方案
推荐阅读
- vba - 使用 SHBrowseForFolderA 选择文件夹在 Windows 10 平台上不起作用
- javascript - 使用拼接方法时如何保留先前的数组
- apache-spark - 无法针对 hadoop 3.2.0 构建 spark2.4.3
- r - 重新整理眼动追踪数据
- python - 如何使用 Python 将写为“h.mm”的时间转换为十进制形式?
- c++ - 使用可变参数模板和运行时索引构造 iterator_range
- php - Google Ads API 未发送正确的关键字估算值
- arrays - 如何根据唯一 ID Nr 将工作表 1 中的值添加到同一 Excel 文件中的另一个工作表?
- python - 为什么我的代码每隔一秒打印一次 cidr 范围?
- reactjs - 尝试从上下文消费者修改状态,但状态仅受我模板中最后一个消费者的影响