I am facing the issue.I changed the db.php file and unfortunately I put the spaces before and after the php tags.I used this in the image.php file.I am getting the error header already sent.I know that it is because of the space in db.php but I used ob_clean in image.php.
Below is the code.
spaceishere<?php
$con=mysql_connect("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db("dbname",$con) or die ("Cannot Connect to Database");
?>andhere
image.php file contains the code of
<?php
require_once('db.php');
$sql="mysqlquery";
$query = mysql_query($sql);
$row = mysql_fetch_assoc($query);
ob_clean();
header("content-type:image/jpg") ;
echo stripslashes($row[imagecolumn]);
?>
everything is working fine when I removed the spaces in db.php.But I cant able to understand why my ob_clean is not working.
Could you please anyone explain it.And I dont want to change the db.php file.Because I am having problem on it.Please dont ask whats the problem.
I want to done all my changes in image.php to make it work.
Please help on this.