Possible Duplicate:
Headers already sent by PHP
<?php
include_once 'session.php';
$uid='0';
error_reporting(E_ALL); ini_set('display_errors', 'On');
if($uid=='0' or empty($uid) or $uid=='')
{
header("Location:index.php");
exit;
}
include_once 'top.php';
?>
My session.php is as follows. It does not even output a word.
<?php error_reporting(0);// Turn off all error reporting
if (!isset($_SESSION)) {
session_start();
}
if(isset($_SESSION['uid']))
{
$uid=$_SESSION['uid'];
$sid='0';
}
else
{
$uid='0';
$sid='0';
}
?>
In the above code, i get the error as follows
Warning: Cannot modify header information - headers already sent by
(output started at /home/content/41/9717441/html/session.php:1)
in /home/content/41/9717441/html/ask.php on line 7
Am i doing anything wrong in code?