fetish 3 Denunciar post Postado Janeiro 6, 2009 Bom estou criando um sistema de login para um jogo, só que ai da os seguintes erros: Warning: Cannot modify header information - headers already sent by (output started at F:\Arquivos de programas\Apache Software Foundation\Apache2.2\www\login\config.php:8) in F:\Arquivos de programas\Apache Software Foundation\Apache2.2\www\login\loged.php on line 25 Warning: Cannot modify header information - headers already sent by (output started at F:\Arquivos de programas\Apache Software Foundation\Apache2.2\www\login\config.php:8) in F:\Arquivos de programas\Apache Software Foundation\Apache2.2\www\login\loged.php on line 26 Warning: Cannot modify header information - headers already sent by (output started at F:\Arquivos de programas\Apache Software Foundation\Apache2.2\www\login\config.php:8) in F:\Arquivos de programas\Apache Software Foundation\Apache2.2\www\login\loged.php on line 27 loged.php <?php include 'config.php'; include 'function.php'; if (($_COOKIE['login'] == "") && ($_COOKIE['senha'] = "")) { echo "Por favor Loge-se"; }else{ class Logar { var $login,$senha,$verifica_login,$verifica_senha; var $query,$sel; function Variable() { $this->login = addslashes($_POST['login']); $this->senha = addslashes($_POST['senha']); $this->verifica_login = verify($this->login); $this->verifica_senha = verify2($this->senha); } function Query() { $this->query = mysql_query ("SELECT `userid`,`user_pass` FROM `login` WHERE `userid` = '$this->login' AND `user_pass` = '$this->senha'"); $this->sel = mysql_fetch_assoc ($this->query); if (($this->sel['userid'] != $this->login) && ($this->sel['user_pass'] != $this->senha)) { echo "Login/Senha Inválidos"; }else { setcookie ("Login",$this->login,time ()+3600); setcookie ("Senha",$this->senha,time ()+3600); header ("Location: /lala.php"); } } } } $MinhaClass = new Logar(); $MinhaClass ->Variable(); $MinhaClass ->Query(); ?> As linhas,25,26,27 são: setcookie,setcookie, header o que tem de errado? Compartilhar este post Link para o post Compartilhar em outros sites
Douglas 6 Denunciar post Postado Janeiro 6, 2009 Provavelmente existe uma saída HTML antes do seu código PHP. Verifique se existe algum espaço em branco. Compartilhar este post Link para o post Compartilhar em outros sites
fetish 3 Denunciar post Postado Janeiro 6, 2009 Obrigado, era isso mesmo xD, nao acredito que 1 TAB ferra tudo. Compartilhar este post Link para o post Compartilhar em outros sites