Home  >  Article  >  Backend Development  >  What does php execution error mean?

What does php execution error mean?

藏色散人
藏色散人Original
2021-11-22 09:14:342532browse

php execution error means that the PHP program execution prompts an error. The solution is to check whether there is output on the error line, and then execute "error_reporting(0);" at the head of index.php.

What does php execution error mean?

#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.

What does php execution error mean?

Specific problem description:

php program execution prompts an error, what is this error?

I left a message on the PHP version of the Wishing Tree that I downloaded online Board program to test the PHP environment built on my own machine. There is no problem when running phpinfo.php. When running the program, the following error is reported, but when I upload this program to a free space with a MYSQL database, there is no problem. Everyone Could you please help me?

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at F:\php\xys\config.php:1) in F:\php\xys\index.php on line 5

Solution:

F:\php\xys\index.php on line 5

Post the 5th line of this file

There is a disgusting thing about PHP. There must be no output before the header, otherwise it will appear: headers already sent

At this time, you need to check whether there is any output above the error line. Sometimes it is because you do not have error_reporting( 0); which results in output caused by undefined variables. Therefore, try it and put an error_reporting(0); in the head of index.php to see if it is normal?

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What does php execution error mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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