New to php! Why does the browser not display php code?

Source: Internet
Author: User
New to php! Why does the browser not display php code? PHP browser

After the browser runs, there will always be blank pages, and then the source file will find no php part of the code? The code is the downloaded source code. Is there a configuration problem?


Reply to discussion (solution)

When calling the mysql_connect () function, the system prompts "undefined function ".
Then I changed php. ini to enable mysql. dll and mysqli. dll, and changed other configurations.

The php code is not visible when you view the source file. Is there no page output for the code, so a blank page appears?


This is the code. I am not very clear about it, but didn't I write echo?

Set

Should each change like this?


It still doesn't work.

Khan ??! To End

Haha, but it still doesn't work.

In php. ini, display_errors = On is used to restart the server and run it again. there is no error message.

No error message

It must be that your if condition is false, so it is not displayed.

No error message
Are you sure you are accessing this file.
If you access this file, there must be information.

Http: // 127.0.0.1/webshop/product_info.php entered in the browser

Check the source file and find no php code.
This is correct, and php code will not appear in the browser!

So why can't I run a complete case? A blank page is displayed after logon.

Can you send the complete case to you?

Paste your code, don't




Product Content page






Require ('sub _ newslist2.php ');
Require ('sub _ productlist3.php');?>










Require_once ("conn/Conn_DB.php"); // contains the database link fileIf ($ _ GET ["P_ID"]! = ""){$ Pid = $ _ GET ["P_ID"]; // product ID$ Str = "select * from Product_Info where P_ID =". $ pid; // query statement$ Arr = mysql_query ($ str); // execute an SQL statement$ Result = mysql_fetch_array ($ arr); // Obtain the query result?>












}?>
'Width = "250px" height = "250px"/>
Market price:
Member price:
"> Add to shopping cart
Product Details
Return



This is only one of the PHP files.

This post was last edited by xuzuning at 13:51:29

Is this product_info.php?
Required During access
Http: // 127.0.0.1/webshop/product_info.php? P_ID = nnn

Why? Display 404 Not Found

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.