PHP content-type=text/html problem
Patrick May 31, 2000
Email it to me and I will talk about my views Previous articleNext article
The following text was written because I saw a lot of such questions on the forum recently. Please give me your advice! ! !
In the FAQ of this site, there are already answers on how to remove some redundant information of PHP4, but strictly speaking, this information is divided into two parts: one part is the message indicating that PHP is running, which is what X- POWERED-BY and the like; another part declares the default content format of the file, text/html. The answers in the FAQ solve the first part of the problem (as long as you add a comment in the relevant line), but the forum is more about the latter part, and I would like to discuss this issue.
The first thing I want to state is that this situation is likely to occur when PHP is running in CGI mode, so I guess it is mostly an error on the WIN32 platform.
First of all, one of the most extreme solutions is to comment out all extension modules, that is, declare in php.ini that those extension modules related to databases, graphics, MAIL, etc. will not be loaded, and some php.ini The file is similar to the following form:
;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro .dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll