Why can't I view php pages in a browser like html?-php Tutorial

Source: Internet
Author: User
Tags what php
Why can't I view the php page in a browser like html? I will enter the address of the php page in the address bar and ask for the answer ------ solution ------------------ what do you want to see? ------ Solution -------------------- is the file containing the displayed content? ------ Solution -------------------- amazing? Why can't I view php pages in a browser just like html?
Enter the address of the php page to the address bar:

Answer

------ Solution --------------------
What do you want to see?
------ Solution --------------------
Is there anything that can be displayed in the file itself?
------ Solution --------------------
Amazing?
The php page is displayed in the browser. This is what we can see after the server explains and runs it.
Is your path incorrect.
------ Solution --------------------
PHP is not called a page, it is called a program. the HTML file generated after being parsed and processed by the PHP engine is the format that the browser can parse before it can be viewed in the browser, the browser does not have the ability to parse PHP programs, so it cannot view PHP and will pop up a dialog box for you to download
------ Solution --------------------
=. =
Php requires a container to run. the result you see is actually the output result after PHP runs, rather than the php code itself.
As if you were using windows, you could see a gorgeous interface instead of a line of code.



LZ: what is described in your image? I think there are the following possibilities:
1. your IIS does not support PHP
2. MIME problems
3. Directory permission problems


------ Solution --------------------
Download xampp, put php under the web root directory, start the server, and then request the php program locally.
------ Solution --------------------
Php files can be viewed in the environment

------ Solution --------------------
Please first find out what php is .... Wait a month and you will find your problem ......
------ Solution --------------------
Discussion

Please first find out what php is .... Wait a month and you will find your problem ......

------ Solution --------------------
Discussion

Reference:
Reference:

Please first find out what php is .... Wait a month and you will find your problem ......


Wait a month and you will find your problem ......

I cheated. it turns out that TNND will take another month to figure out...


Call, I just want to know how to make php look like html directly in the browser!

No need to be complicated ......

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.