Question: Can’t this code be output every second? Cause Analysis: Apache operating principle: After accessing an address (sending a request), PHP is started in the apache server. PHP execution is at the page level. If there is executable code: After it is all executed, it is thrown to apache, and apache is thrown to the browser to display the results. Solution: If the cli displays results in a different way, what's the difference? linux cmd: php5test.php It can be implemented directly by php without going through apache or web service:
|