Why is the PHP code wrong?

Source: Internet
Author: User
Kkk
 
  


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


Reply to discussion (solution)

is the PHP environment configured successfully? Is this code put into an HTML file or a PHP file? And how did you access it?
Look at the source code to see the PHP parsing No.

is the PHP environment configured successfully? Is this code put into an HTML file or a PHP file? And how did you access it?
Look at the source code to see the PHP parsing No.

FileName is: a.htm

The configuration should be successful, and the Apache installation is complete. Enter URL: 127.0.0.1, display the test page.

But why is the PHP code not showing?

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

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?


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

··· File name is the HTM server how to parse the pinch Change to PHP file first

If multiple languages are mixed, what is the filename suffix?

If multiple languages are mixed, what is the filename suffix?
What kind of language do you use to write the suffix name,
PHP language for. php
. NET languages with. aspx
Wait a minute

You now use PHP to program, you need to use the. php suffix name. Even if there is JavaScript in it (this is just scripting language) HTML (simple point is the template) suffix name or. php

I suggest you take a look at the basics.

Your code itself is not wrong!
You can see the PHP code that is not executed when you view the source code of the Web page in the browser

Why not executed, the reason above has been said

The file name must be a. php file to parse the PHP code

The file name must be a. php file to parse the PHP code

Because if you don't use the PHP suffix, how does he know what to parse?
In fact, you can also use the HTML suffix, then you have to change the Web server settings.
The HTML file is not parsed by default.


The file name must be a. php file to parse the PHP code

Because if you don't use the PHP suffix, how does he know what to parse?
In fact, you can also use the HTML suffix, then you have to change the Web server settings.
The HTML file is not parsed by default.

For the Web server to resolve, the source code has PHP source, the extension is: HTML page.
How is the Web server set up?

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.