dpb 0 Denunciar post Postado Janeiro 21, 2016 Ola pessoal tenho hum Sistema de sessão Bem básico Pois é SOMENTE Para uma pessoa utilizar e hum Sistema de Consulta Onde desen de aparecer o titulo, noticia ea Imagem de mas ESTA ocorrendo Alguns Erros São OS seguintes: noticia_meio_home.php Aviso: mysqli_fetch_object () espera o parâmetro 1 para ser mysqli_result, boolean dada em /home/benezersvp/public_html/radio/noticia_meio_home.php na linha 26 <! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns = "http : //www.w3.org/1999/xhtml "> <head> <meta http-equiv =" Content-Type texto "content =" / html; charset = utf-8 "/> <title> Cadastrar animais </ title> <link href = "estilos.css" rel = tipo "folha de estilo" = "text / css" /> </ head> <body> <div id = "corpo"> <div> <? php incluem "topo. php "; ?> </ div> <div id = "meio" align = "center"> <div align = "left" class = "cas"> <div class = "titulo"> <center> </ center> </ div > <? php // conexao com Banco de Dados require ("conexao.php"); // seleciona todos OS usuarios $ sql = mysqli_query ($ con, "SELECT * FROM noticias ORDER BY id DESC"); // exibir como INFORMAÇÕES while ($ usuario = mysqli_fetch_object ($ sql)) {echo "<table border = width '2px' = '900px"> <tr> <td> <img src =' img /".$ usuario-> Imagem. " 'alt =' Imagem de Exibição'height = '200' class = 'AlignLeft "/> <br /> <div style =" text-align: center "> <strong> Título: </ strong> </ br> $ usuario-> Nome </ div> <br/> <div e não restrito.php Aviso: Não é possível modificar a informação de encabeçamento - encabeçamentos já enviada pelo (a saída começou em /home/benezersvp/public_html/radio/painel_controle.php:1) em /home/benezersvp/public_html/radio/restrito.php na linha 9 Aviso: Não é possível modificar informações de cabeçalho - cabeçalhos já foi enviado pelo (a saída começou em /home/benezersvp/public_html/radio/painel_controle.php:1) em /home/benezersvp/public_html/radio/restrito.php na linha 10 <? php // Definimos o Nome de Usuário e Senha de Acesso $ usuario = "admin"; $ Senha = "admin"; // Criamos Uma Função that exibirá Uma Mensagem de Erro Caso OS Dados estejam errados função Erro () { // Definindo Cabeçalhos header ("WWW-Authenticate: reino básico =" Administracao "');; header (' 1.0 401 Unauthorized HTTP / ') // Mensagem Que Será exibida echo" <script language = "JavaScript" type =' text / javascript "> alert ('Área Restrita Você Não Tem Permissão!'); window.location.href = 'index.php' </ script>"; // Pára o Carregamento da Página saída;} // Se INFORMAÇÕES NÃO como setadas were if (! isset ($ _ SERVER ['PHP_AUTH_USER']) ou isset ($ _ SERVER ['PHP_AUTH_PW'])!) {Erro ();} // Se como INFORMAÇÕES were setadas else {// Se OS Dados informados FOREM Diferentes dos definidos if ($ _SERVER ['PHP_AUTH_USER'] = $ usuario ou $ _SERVER ['PHP_AUTH_PW'] = $ Senha!) {Erro ();}}>? pagina Onde E Feita uma Restrição: painel_controle.php <? php // Incluimos o Arquivo de Restrição require_once ("restrito.php");?> <DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitional // EN" "http: //www.w3 .org / TR / xhtml1 / DTD / xhtml1-transitional.dtd "> <html xmlns =" http://www.w3.org/1999/xhtml "> <head> <meta http-equiv =" Content-Type " content = "text / html; charset = utf-8" /> <title> Cadastrar animais </ title> <link href = "estilos.css" rel = "stylesheet" type = "text / css" /> </ head > <body> <div id = "corpo"> <div> <? php include "topo.php?"; ?> </ div> <div id = "meio" align = "center"> <div align = "left" class = "cas"> <div class = "titulo" align = "center"> Painel de Controle (Área Restrita Administrador) </ div> <table width = altura "600px" = "30px" bordercolor = "# FF6600" border = bgcolor "2px" = "# FFFFFF" align = "center"> <tr> <td height = " 30px "class =" fonte_menu "> Cadastrar Comentários </ td> <td height =" 40px "> <div align =" center "> <a href="cadastrar_comentario.php" class="linkcinza"> Cadastrar </a> </ div> </ td> <td height = "40px"> <div align = "center"> <a href="listarcomentarios.php" class="linkcinza"> Listar </a> </ div> </ td> </ tr> <! - <tr> <td height = "30px" class = "fonte_menu"> Cadastrar Usuários </ td> <td height = "40px"> <div align = "center"> <a href = class "cadastrar_pessoa.php" = "linkcinza"> Cadastrar </a> </ div> </ td> <td height = "40px"> <div align = "center"> <a href = "listarusuarios.php "class =" linkcinza "> Listar </a> </ div> </ td> </ tr> -> <tr> <td height =" "class =" 30px fonte_menu "> Mensagem Tela principal </ td> <td altura = "40px"> <div align = "center"> <a href="cadastrar_mensagem.php" class="linkcinza"> Cadastrar </a> </ div> </ td> <td height = "40px "> <div align =" center "> <a href="listar_mensagem_apagar.php" class="linkcinza"> Listar </a> </ div> </ td> </ tr> <tr> <td height =" "class =" 30px fonte_menu "> Cadastro de Notícias </ td> <td height =" 40px "> <div align =" center "> <a href="cadastrar_noticia.php" class="linkcinza"> Cadastrar </ a > </ div> </ td> <td height = "40px"> <div align = "center"> <a href="listar_noticia.php" class="linkcinza"> Listar </a> </ div> < / td> </ tr> <tr> <td height = classe "30px" = "fonte_menu"> Rádio </ td> <td height = "40px"> <div align = "center"> <a href = "http : //painel.streamingbage.net.br/ "class =" linkcinza " incluem 'rodape.php';?> </ div> </ body> </ html> Compartilhar este post Link para o post Compartilhar em outros sites
Beraldo 864 Denunciar post Postado Janeiro 21, 2016 mysqli_query falhou e retorno false. É o mesmo problema que explico aqui Faça debug das queries, com mysqli_error(), como mostrado neste tópico Compartilhar este post Link para o post Compartilhar em outros sites
dpb 0 Denunciar post Postado Janeiro 21, 2016 Referente a consulta esta parece ok agora o único erro que ficou é esse [/size] Warning: Cannot modify header information - headers already sent by (output started at /home/benezersvp/public_html/radio/painel_controle.php:1) in [/size]/home/benezersvp/public_html/radio/restrito.php on line [/size]9 Warning: Cannot modify header information - headers already sent by (output started at /home/benezersvp/public_html/radio/painel_controle.php:1) in [/size]/home/benezersvp/public_html/radio/restrito.php on line [/size]10 Referente <? php // Definimos o Nome de Usuário e Senha de Acesso $ usuario = "admin"; $ Senha = "admin"; // Criamos Uma Função que exibirá Uma Mensagem de Erro Caso OS Dados estejam errados Função Erro () {// Definindo Cabeçalhos header ("WWW-Authenticate: reino básico =" Administracao "') ;; header (' 1.0 401 Unauthorized HTTP / ') // Mensagem Que Será exibida echo" <script language = "JavaScript" type = "text / javascript" > alert ('Área Restrita Você Não Tem Permissão!'); window.location.href = </ script 'index.php'> "; // PARA O Carregamento da Página Saida;} // Se Informações Nao foram setadas Como se (isset ($ _ SERVER ['PHP_AUTH_USER']) isset UO ($ _ SERVER ['PHP_AUTH_PW'])!) {Erro ();} // SE INFORMAÇÕES Como foram setadas else {// Se OS Dados informados FOREM Diferentes dos definidos if ($ _SERVER ['PHP_AUTH_USER'] = $ usuario OU $ _SERVER ['PHP_AUTH_PW'] = $ Senha!) {Erro ();}}>? A parte da query parece ok agora o único erro que estou penando é: [/size] Warning: Cannot modify header information - headers already sent by (output started at /home/benezersvp/public_html/radio/painel_controle.php:1) in [/size]/home/benezersvp/public_html/radio/restrito.php on line [/size]9 Warning: Cannot modify header information - headers already sent by (output started at /home/benezersvp/public_html/radio/painel_controle.php:1) in [/size]/home/benezersvp/public_html/radio/restrito.php on line [/size]10 Referente <? php // Definimos o Nome de Usuário e Senha de Acesso $ usuario = "admin"; $ Senha = "admin"; // Criamos Uma Função that exibirá Uma Mensagem de Erro Caso OS Dados estejam errados função Erro () { // Definindo Cabeçalhos header ("WWW-Authenticate: reino básico =" Administracao "');; header (' 1.0 401 Unauthorized HTTP / ') // Mensagem Que Será exibida echo" <script language = "JavaScript" type =' text / javascript "> alert ('Área Restrita Você Não Tem Permissão!'); window.location.href = 'index.php' </ script>"; // Pára o Carregamento da Página saída;} // Se INFORMAÇÕES NÃO como setadas were if (! isset ($ _ SERVER ['PHP_AUTH_USER']) ou isset ($ _ SERVER ['PHP_AUTH_PW'])!) {Erro ();} // Se como INFORMAÇÕES were setadas else {// Se OS Dados informados FOREM Diferentes dos definidos if ($ _SERVER ['PHP_AUTH_USER'] = $ usuario ou $ _SERVER ['PHP_AUTH_PW'] = $ Senha!) {Erro ();}}>? Compartilhar este post Link para o post Compartilhar em outros sites
Beraldo 864 Denunciar post Postado Janeiro 22, 2016 Esse erro está explicado no mesmo link que te passei antes Compartilhar este post Link para o post Compartilhar em outros sites
dpb 0 Denunciar post Postado Fevereiro 5, 2016 Erro resolvido valeu pessoal. Compartilhar este post Link para o post Compartilhar em outros sites