What should I do if php echo does not display?

藏色散人
Release: 2023-03-08 22:58:01
Original
3986 people have browsed it

Solutions for php echo not displaying: 1. Add cache characters; 2. Clear the cache; 3. Clear the data cached by the server through "ob_end_clean()"; 4. Increase the timeout setting; 5. Just delete QS_SrvMinDataRate in httpd.conf.

What should I do if php echo does not display?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

PHP echo does not display another one during debugging One reason

When executing a long-term PHP program, the intermediate ECHO does not output.

General solutions: add cache characters, clear cache, etc.

echo str_pad('', 1024*4); flush(); ob_flush();
Copy after login

ob_end_clean() Silently clears the data cached on the server side. Other methods

also increase the timeout setting.

set_time_limit(0); ini_set("max_execution_time",0);
Copy after login

When none of the above works, you can check the APACHE log to see if the QOS module has security filtering settings.

Test method, you can use

for ($i=0;$i<30;$i++){ echo $i. flush(); sleep(1); }
Copy after login

to see if it can be executed for 30 seconds. If not, there is a problem with the server.

Usually in httpd.conf, there may be QS_SrvMinDataRate 150 1200 causing truncation. Just remove it.

[Recommended learning:PHP video tutorial]

The above is the detailed content of What should I do if php echo does not display?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!