Why the PHP code is wrong

Source: Internet
Author: User
Why is the PHP code wrong?




Kkk
echo "HTML php!";
?>





Mozila Firefox browser, display only: KKK.
The PHP code section is not displayed, why?

Share to:


------Solution--------------------
Change the file name to: a.php so that the PHP code can be parsed
------Solution--------------------
References:
Quote: References:

Change the file name to: a.php so that the PHP code can be parsed


1. The above source code, mixed with HTML language, PHP language. Why does the file name suffix must be. php to parse the PHP code?

2. If the source code has HMTL language, PHP language, JavaScript language and many other languages mixed together. So, what should the filename suffix be?

PHP at the end, there is PHP code must be PHP to compile, and then to the server, and then sent to the browser to respond to the user, this is the process
------Solution--------------------
··· File name is the HTM server how to parse the pinch Change to PHP file first
------Solution--------------------
Take Apache for example httpd.conf inside there

AddType application/x-httpd-php. PhP4. php3. php . htm. html . phtml. Ph. Inc

  • Related Article

    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.