Forum Moderators: coopster
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\New Web\phpmygrades\lib\printlib.php:38) in C:\wamp\www\New Web\phpmygrades\lib\authlib.php on line 139
i think its all about whitespaces
so here is the code of printlib.php
function display_header($title)
{
$text = <<< EOT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>{$title}</title>
<meta http-equiv="content-language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/main.css" />\n
EOT;
// add the rss feed to the main page
if(strstr($_SERVER['SCRIPT_NAME'], "index.php") != FALSE)
{
$text .= "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS feed\" href=\"" . server_root . "news.php?xml&class=0\" />\n";
}
$text .= <<< EOT
<script type="text/javascript" src="scripts/main.js"></script>
</head>
<body>
<div class="container">
EOT;
print($text); // line 38
}
/**
* prints the basic webpage header
*/
function display_footer()
{
$text = <<< EOT
\n</div>
</body>
</html>
EOT;
print($text);
}
can someone help me to figure out whats the problem on the code?