When I was writing php code, I suddenly encountered a problem: Warning: Cannotmodifyheaderinformation
When I was writing php code, I suddenly encountered a problem: the prompt Warning: Cannot modify header information-headers already sent..., there are a lot of messy things on the page. It's strange that at the beginning, this problem sometimes disappears. It was strange that many php configuration changes were found in the web query later,
When writing php code, I suddenly encountered a problem:
Prompt Warning: Cannot modify header information-headers already sent ...,
There are a lot of messy things on the page. It's strange that this problem sometimes disappears at the beginning. Very strange
I found a lot of php configuration changes on the Internet later, and I felt that there was a sudden problem with the good page, which is not a problem with the php configuration. It shows where the code encountered a problem,
I recalled the newly added code. There were only a few methods to call system () to execute the command line. Then I checked the system function and found the problem: the system () function executes the given command, output and return results. Therefore, when executing the command line command, the output information is output to the page, and an exec command is found during the query, which is similar to system, but it executes the command and does not output the result, only the last row of the result is returned. So use exec to replace system, so that no output is available, and the problem is solved!
As for the problem, sometimes the output cache may disappear due to command line output.