Just a newbie, jump code someone else wrote for me, the purpose is to jump, the file is go. php when the URL is entered go. php? Idtaobao jumps to www.taobao.com and changes the host. The error "Warning: Cannotmodifyheaderinformation" is a newbie. The jump code is written by someone else to help me. The purpose is to jump to the file go. php.
When you enter go. php? When id = taobao, it will jump to www.taobao.com
An error occurred after changing the host.
Warning: Cannot modify header information-headers already sent by (output started at/data/home /...... /Go. php: 8) in/data/home /...... /Go. php on line 10
Baidu learned that php. ini needs to be changed, but it is very troublesome to change the new host .. Is there any way to directly modify the above errors in the php code of the above file?
Code:
Entering ....
How can I modify it? Thank you !!!
Reply content:
New guy, jump code someone else wrote for me, the purpose is to jump, the file is go. php
When you enter go. php? When id = taobao, it will jump to www.taobao.com
An error occurred after changing the host.
Warning: Cannot modify header information-headers already sent by (output started at/data/home /...... /Go. php: 8) in/data/home /...... /Go. php on line 10
Baidu learned that php. ini needs to be changed, but it is very troublesome to change the new host .. Is there any way to directly modify the above errors in the php code of the above file?
Code:
Entering ....
How can I modify it? Thank you !!!
The go. php page can only be used to determine whether to jump to the page. The html tag can be removed. The code of the go. php file can be reduced to the remaining php:
php
If the headers already sent error still persists, the editor that writes the Code hides the bom header information at the beginning of the file. You can search the relevant editor method on the Internet.
If you want to retain the html code and want to jump, you need to use the browser-side page Jump method. The code can be changed:
php
Entering ....
"; Break; case 'baidu': echo"
"; Break; case 'others ': echo"
"; Break ;}?>
What is the difference between http-equiv jump and header jump? Please refer to the http://segmentfault.com/q/1010000000703858
Set Put the code block at the top of the file.
Header () is used to send custom HTTP packets.
Note that header () must be called before any actual output, whether it is a common html Tag, empty lines in the file, spaces, or empty lines in the PHP> file.
This is a very common error. When using include, require, or other files
If there are spaces or empty rows before the header () is called.
If other files are not called, but only a PHP or HTML file is used separately, an error occurs before the header () is called.
Php Manual