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.