Ridicule: What is the suffix of a file containing php scripts?

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.