你用的是PHP4吧!
在 PHP.ini文件中有:
;Windows Extensions
;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_imap.dll
extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll
; Note that MySQL support is now built in, so no dll is needed for it.
将对应项的";"去掉,将PHP文件包里的相应文件考到Windows/system下,最重要的是指定路径正确。
The Header() function must be the first function to print any output of any kind.
The error says that the error occurs at line 3, which should be your header line, but that is line 2 in the script. Do you have any html text before the script?
If you plan to use this function to include an image in your html, you can forget it, because you can only make an image if you use the header() statement, and you can only use the header statement if you don't print anything before the header statement.
Ergo, you can't print the "<img src=" tag before printing the image.
You will have to make a seperate script for the image.
这是错误信息:Warning: Cannot add header information - headers already sent by (output started at C:\Program Files\php-web\test.php:2) in C:\Program Files\php-web\test.php on line 3