Laugh at it: the file containing the php script, the file suffixed with "how to contain the php script", and the suffix. It must be php not ------ solution ------------------ vimtest. notphp --------------------------#! Usrlocalphpbinphp & lt ;? Phpecho & quot; Imnotphpfil: What is the suffix of a file containing php scripts?
Why is the suffix of a file containing a php script. It must be php no
------ Solution --------------------
Vim test. notphp
--------------------------
#! /Usr/local/php/bin/php
Echo "I'm not php file! ";
--------------------------
AngryfrogdeMacBook-Air: website angryfrog $ chmod + x test. notphp
AngryfrogdeMacBook-Air: website angryfrog $./test. notphp
I'm not php file!
------ Solution --------------------
You are poisoned by windows.
In fact, windows only uses the suffix name as a reference, and uses the record in the registry to associate the suffix name with the command used to open it as the default. If there is a file without a suffix or a suffix that your system does not know, it will also enable you to choose what to open.
In unix/linux, the system simply ignores the suffix.
------ Solution --------------------
Change the apache configuration file.
The installation directory contains a conf folder containing the httpd. conf file.
Change
LoadModule php5_module D:/php/php5apache2. dll
AddType application/x-httpd-php. php
. Php: the suffix you want