Home  >  Article  >  Backend Development  >  Why do PHP programs sometimes show up at the beginning: X-Powered-ByPH_PHP Tutorial

Why do PHP programs sometimes show up at the beginning: X-Powered-ByPH_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:53:281231browse

This is because of PHP. There are some incorrect settings in the INI, most likely an invalid DLL file. But why does this happen?
I created an empty test.php file under WIN32.
Then execute c:php4php.exe test.php. At this time, my php.ini configuration is correct. The screen output is:
X-Powered-By: PHP/4.0.0
Content-type: text/html
Hey, isn’t this what is displayed on the screen? Yes. But at this time these two lines are used as HTTP information headers. will not be displayed in the browser.
Now I have php_mysql.dll loaded in php.ini. And this file does not exist.
Execute c:php4php.exe test.php again, the screen output is:
Content-type: text/html
PHP Fatal error: Unable to load dynamic library 'php_mysql.dll'
Here There are also some random characters
X-Powered-By: PHP/4.0.0
Content-type: text/html
Just after Content-type: text/html, some error messages appeared, so This causes X-Powered-By: PHP/4.0.0 Content-type: text/html to appear on the screen. And this is actually the HTTP information header.
Then I think when these errors occur, if output_buffering=off, then setcookie() cannot be used.
Understand?

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632400.htmlTechArticleThis is because of PHP. There are some incorrect settings in the INI, most likely an invalid DLL file. But why does this happen? I created an empty test.php file under WIN32. ...
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