Web page Cannot parse PHP, can see the source code
Ideas:
Because Apache can not parse PHP, so we have to see whether PHP loaded parsing php template
1. httpd-m see if there are php5_module
2. If present, add AddType application/x-httpd-php. PHP and Change the default index page of the directory to index.php that is DirectoryIndex index.php
The most important point: Remember to restart Apache, the Linux command: AP achectl Restart restart
Complete ideas:
# Load PHP Module
LoadFile "/opt/php-5.3.1/php5ts.dll"
LoadModule php5_module "/opt/php-5.3.1/php5apache2_2.dll"
# The directory where the php.ini file is located
Phpinidir "/opt/php-5.3.1"
# When a PHP page request is accepted, it is explained to the PHP engine instead of the download page
AddHandler php5-script PHP
AddType application/x-httpd-php. php. php5
AddType Application/x-httpd-php-source. Phps
# Change the directory's default index page to index.php
DirectoryIndex index.php
The above describes the Linux server Apache can not parse the PHP program, including the content, I hope that the PHP tutorial interested in a friend helpful.