Php's ob_start function intercepts the standard output method, phpob_start. Php's ob_start and other functions intercept standard output methods. phpob_start recently used PHP to develop a software under cli, and encountered such a problem. I want to collect the items output in the PHP script and use functions such as ob_start in php to intercept the standard output method, phpob_start
I recently used PHP to develop a software under cli and encountered such a problem. I want to collect the items output in the PHP script, so I used the ob_start and ob_end_flush functions to collect the output content, however, it is also printed to the console interface. I want to ask if there is any way to prevent PHP from outputting information like the console. In principle, the software does not allow printing anything to the console.
Php-cli itself runs scripts out of the web server. I don't know how the data you get is obtained now? If you do not obtain the value returned by executing the php program through cli, you can use ob_get_clean ()
It will get the cached content and then clear the cache area. this will not show the display interface as you said.
Of course, you can also get the buffer content, then clear the content (control should not be output to the console), and then falsh the content to the web server for processing.
The above method is used. I have used this series of functions before. I don't need them for a long time, so I forget it.
Now we are working on a PHP-based multi-process HTTP Dynamic Server. My graduation thesis is nothing more than a test item.
The execution result of the php-cgi program is a standard input and output, so the output result can only be captured by obtaining the standard input and output. the pipeline should also be OK, but I won't
The above is all the content of this article. I hope you will like it.
Ob_start and other functions intercept standard output methods. phpob_start recently used PHP to develop a software under cli, and encountered such a problem. I want to collect the output in the PHP script...