[ burtonium @ 19.09.2004. 11:55 ] @
Pozdrav svima, imam jedan problem, a taj je vidljiv na donjoj adresi: http://213.161.21.80:8080/milojko/finalplan2/admin/index2.php Prilazem i index2.php, kao i index3.php koji radi kako treba ali nije dokument u obliku xhtml. Samo me interesuje kako bih mogao da upotrebim xhtml header a da ne dobijam pomenuti error: Code: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/localhost/htdocs/milojko/finalplan2/admin/index2.php:1) in /var/www/localhost/htdocs/milojko/finalplan2/admin/index2.php on line 2 Code: <? session_start(); include ("protection/accesscontrol.php"); echo "<"."?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?> <!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> <title>One Hundred Percent Height Divs</title> <![if IE]> <link rel="stylesheet" type="text/css" href="neki_mojga.css" /> <![endif]> <![if !IE]> <link rel="stylesheet" type="text/css" href="neki_mojgaFF.css" /> <![endif]> </head> <body> <div id="header"> <table width="100%"> <tr> <td bgcolor=lightgreen><a href=http://213.161.21.80:8080/milojko/finalplan2/admin/index.php?f=uredi><b>urejevalnik</b></a></td> <td bgcolor=lightblue ><a href=http://213.161.21.80:8080/milojko/finalplan2/admin/index.php?f=drevo><b>struktura</b></a></td> <td bgcolor=yellow ><a href=http://213.161.21.80:8080/milojko/finalplan2/admin/index.php?sess=678529>Odjavi se</a></td> </tr> </table> </div> <div class="content"> <? if ($GLOBALS[f] == "") { if ($_SESSION[tema] == "") { $_SESSION[tema] = "uredi"; } } else { $_SESSION[tema] = $GLOBALS[f]; } if ($_SESSION[tema] == "uredi") { include ("classes/commonclass.php"); $obj=New commonclass; $obj->zacetna_stran(); } else if ($_SESSION[tema] == "drevo") { include ("classes/drevo.php"); $obj = New drevo; $obj->izpis(0); } ?> </div> </body> </html> index3.php sa obicnim html tagom radi. http://213.161.21.80:8080/milojko/finalplan2/admin/index3.php Code: <? session_start(); include ("protection/accesscontrol.php"); ?> <html> <head> <title>One Hundred Percent Height Divs</title> <![if IE]> <link rel="stylesheet" type="text/css" href="neki_mojga.css" /> <![endif]> <![if !IE]> <link rel="stylesheet" type="text/css" href="neki_mojgaFF.css" /> <![endif]> </head> <body> <div id="header"> <table width="100%"> <tr> <td bgcolor=lightgreen><a href=http://213.161.21.80:8080/milojko/finalplan2/admin/index.php?f=uredi><b>urejevalnik</b></a></td> <td bgcolor=lightblue ><a href=http://213.161.21.80:8080/milojko/finalplan2/admin/index.php?f=drevo><b>struktura</b></a></td> <td bgcolor=yellow ><a href=http://213.161.21.80:8080/milojko/finalplan2/admin/index.php?sess=678529>Odjavi se</a></td> </tr> </table> </div> <div class="content"> <? if ($GLOBALS[f] == "") { if ($_SESSION[tema] == "") { $_SESSION[tema] = "uredi"; } } else { $_SESSION[tema] = $GLOBALS[f]; } if ($_SESSION[tema] == "uredi") { include ("classes/commonclass.php"); $obj=New commonclass; $obj->zacetna_stran(); } else if ($_SESSION[tema] == "drevo") { include ("classes/drevo.php"); $obj = New drevo; $obj->izpis(0); } ?> </div> </body> </html> HVALA UNAPRED! Dusan |