在此之前,必须安装php对于apache的模块 sudo apt install php libapache2-mod-php 安装之后,浏览器就会正常解析php 原文链接 https://blog.csdn.net/zhuocr/article/details/60780617