Header cannot issue header cache
Warning: Cannot modify header information-headers already sent by (output started at E: \ AppServ \ www \ php_cs_wenjian \ yingp \ qbzy. php: 23) in E: \ AppServ \ www \ php_cs_wenjian \ yingp \ mongodes \ hanshu. php on line 333
This problem has been solved before. it is used to exclude a little bit! This code is very difficult to find and involves a lot of functions, so I would like to ask the experts to give a method! I heard that the cache technology can solve this problem! Who knows? I have never used cache,
Reply to discussion (solution)
The code calls the header setting function twice. the two calls are probably header ()
The code calls the header setting function twice. the two calls are probably header ()
I just write a simple judgment class and generate a cookie!
Whether there is output before, such as empty rows. Whether the file encoding is consistent.
Is there any output before the file?
There is another possibility. BOM header
Whether there is output before, such as empty rows. Whether the file encoding is consistent.
Is it output to the browser or how to output it? I put the judgment in the function set, then called the function set to the page on which the function is used, and what does that empty line mean?
You need to post the code.
You need to post the code.
Two more function pages, one database page, and one problematic page! How can I post 700 or 800 lines of code on four pages?
You need to post the code.
Class goow {
Public $ han = "script window. onload = function () {boxs (1);} script";
Function cshu ($ czhi ){
Echo $ this-> han;
$ This-> scuo ="
$ Czhi
";
}
}
Class goow_cd extends goow {
Private $ _ char_pattern = '/[<> \ | \' \ $ \ "\]/';
Function d ($ user, $ pass ){
If ($ user = ''){
$ This-> cshu ('user name cannot be blank ');
Return false;
}
$ This-> user = $ user;
If ($ pass = ''){
$ This-> cshu ('password cannot be blank ');
Return false;
}
If (10 <mb_strlen ($ user, utf8) or mb_strlen ($ user, utf8) <2 ){
$ This-> cshu ('The user name must be at least two or more 10 ');
Return false;
}
If (preg_match ($ this-> _ char_pattern, $ user )){
$ This-> cshu ('user name cannot contain sensitive characters ');
Return false;
}
If (16 <mb_strlen ($ pass, utf8) or mb_strlen ($ pass, utf8) <6 ){
$ This-> cshu ('The password must be at least 6 or greater than 10 ');
Return false;
}
$ Pass = sha1 (md5 ($ pass ));
$ This-> pass = $ pass;
If (! My_shuz ("select user from user where user = '$ user' LIMIT 1 ")){
$ This-> cshu ('No user exists ');
Return false;
}
If (! My_shuz ("select pass from user where pass = '$ pass' LIMIT 1 ")){
$ This-> cshu ('User or password error ');
Return false;
}
If (! My_shuz ("select zyuip from user where zyuip ='' and user = '$ user' LIMIT 1 ")){
$ This-> cshu ('This account has not been activated ');
Return false;
}
Setcookie ("UserName", $ user );
}
}
This is a class
Session_start ();
Define ('in _ TG ', true );
Require substr (dirname (_ FILE _), 0,-6). '/yingp/mongodes/hanshu. php ';
If ($ _ GET ['shouid']! = ''){
Q_mysql ();
$ P_xiangx = pduan_f ("select * from product where p_id = '{$ _ GET ['shouid']}'", 'no such item ');
} Else {
Tangc ('No such item ');
}
$ P_zp = array_filter (split (',', $ p_xiangx ['p _ zp']);
$ P_dx = array_filter (split (',', $ p_xiangx ['p _ dx ']);
$ P_zps = count ($ p_zp );
Echo"