note 37631 added to function.header

From: Date: Fri, 21 Nov 2003 12:00:32 +0000
Subject: note 37631 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-60748@lists.php.net to get a copy of this message
Hi, I am trying to send a header with PHP 4 to work into WAP Gateway as: header("Content-Type: text/vnd.wap.wml"); At the top of PHP page. then when I try to visit the PHP page from nokia mobil browser simulator it show me the next messatge.: "Expecting Content is Missing in the Response" But, if I delete the header function, it work, but the links into the mobil browser don't work. Could Somebody help me, please? Thanks a lot! Here is the complete PHP page: <?php header("Content-Type: text/vnd.wap.wml; charset: iso-8859-1"); echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \n" ."\"http://www.wapforum.org/DTD/wml_1.1.xml\"\n>"; ?> <wml> <head> <meta http-equiv="Content-Type" content="text/vnd.wap.wlm" /> </head> <card id="Principal"> <p align="center"> <strong>CH TRUEBA</strong> </p> <p align="center"> <br /> <u>NOTICIAS</u> </p> <p align="left"> <br /> <?php @ $db = mysql_pconnect($_serverdb,$_user,$_password); if (!$db) echo "Fallo al conectar con nuestra " ."Base de Datos.<br /><br />" ."Porfavor, inténtelo más tarde." ."<br /><br />Rogamos disculpe las molestias.<br />"; else{ mysql_select_db($_dbname); $inicio = $HTTP_POST_VARS['inicio']; $sql_text = "select id_noticia,fecha,titular from noticia order by fecha DESC limit ".$inicio.",3"; $inicio +=3; $datos = mysql_query($sql_text); $filas = mysql_num_rows($datos); if ($filas>0){ for ($i=0; $i<$filas;$i++){ $fila = mysql_fetch_array($datos); echo Date('d/m/y',strtotime($fila['fecha'])).",<br />\n"; echo "<anchor>\n"; echo substr(stripslashes($fila['titular']),0,50)."...\n"; echo " <go method=\"post\" href=\"noticia.php\">\n"; echo " <postfiled name=\"id_noticia\" value=\"".$fila['id_noticia']."\" />\n"; echo " </go>\n"; echo "</anchor>\n"; echo "<br />--------------<br />\n"; } echo "<anchor>Más titulares...\n"; echo " <go href=\"noticias.php?inicio=".$inicio."\">\n"; echo " <postfield name=\"inicio\" value=\"".$inicio."\" />\n"; echo " </go>\n"; echo "</anchor>\n"; echo "<br />\n"; }else echo "No se han encontrado titulares.<br />"; } ?> </p> <p align="right"> <anchor>MENU WAP <go href="menu.wml" /> </anchor> </p> </card> </wml> ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37631 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37631&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37631&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60748) next »