To solve the problem that the php file has output but does not display the template file when the http Status Code 200 is fixed,

Source: Internet
Author: User

To solve the problem that the php file has output but does not display the template file when the http Status Code 200 is fixed,

Question 1

After building an online test site for the company, enter "http://xxx.xxx.xxx/index.php" in the browser address bar, the page did not show anything. Check that the http status code is 200, indicating that the client request is successful, but why is the page not displayed?

Solution 2

First, add the test statement to the first line of the index. php file in the root directory.

Echo 'Hello World! '; Exit;

Refresh the browser and find that the browser outputs 'Hello World! ', Indicating that the index. php file is correctly executed.

It is suspected that the problem lies in loading the template file. Continue debugging and test twice before and after loading the template file in index. php. This confirms that the problem lies in loading the template file.

After viewing the template function source code, check that the cause of this problem is that the compilation file does not exist.

Solve the problem by creating a compiled file.

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.