Home  >  Article  >  Backend Development  >  What to do if ubuntu php does not parse

What to do if ubuntu php does not parse

藏色散人
藏色散人Original
2021-12-17 11:06:314441browse

Solution to ubuntu php not parsing: 1. Install apache2 and php7.0 libapache2-mod-php7.0; 2. Modify short_open_tag in the php configuration file to on.

What to do if ubuntu php does not parse

The operating environment of this article: ubuntu 16.04 system, php7.0 version, Dell G3 computer.

What should I do if ubuntu php does not parse?

ubuntu16.04 php cannot be parsed normally:

Install apache2:

apt-get install apache2

Install php7.0 libapache2-mod-php7.0:

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

can access the html webpage normally:

What to do if ubuntu php does not parse

but cannot open the php file. The php file is written as follows:

What to do if ubuntu php does not parse

Processing: Change the above code to the following

What to do if ubuntu php does not parse

.

Or change

What to do if ubuntu php does not parse

Off in the php configuration file to On.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if ubuntu php does not parse. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn