1. 安装php7.0

sudo apt-get install php7.0

2. 安装apache的php 模块

$ sudo apt-get install libapache2-mod-php7.0

3. 测试php 和Apache时候正常工作

$ sudo vim /etc/apache2/sites-available/000-default.conf查看工作目录

windows 子系统 ubuntu16.04安装php7.0

在/var/www/html下增加一个index.php文件,在index.php中输入<?php phpinfo();?>

$ sudo service apache2 restart 重启apache

浏览器输入 http://localhost/index.php 出现下面信息,成功。

windows 子系统 ubuntu16.04安装php7.0


相关文章:

  • 2021-07-01
  • 2021-11-19
  • 2021-12-16
  • 2021-09-22
  • 2022-12-23
  • 2021-05-15
  • 2021-04-15
猜你喜欢
  • 2021-10-04
  • 2021-08-12
  • 2021-11-29
  • 2022-12-23
  • 2021-07-01
  • 2022-01-12
相关资源
相似解决方案