This is wrong, first, you need to specify the content type: jpeg, gif, png, etc...
Second, you aren't opening a file, so file_get_contents() should not be used.
Here i tried...
print $log['file'];
but the result came as OX
plz give me an solution
Hi hemashiki,
according to you, you have already save image to database right? now you want to retrieve the image?
here try this code, i've come up with this code when i encountered the same problem as yours.
Expand|Select|Wrap|Line Numbers
mysql_connect("localhost","root","");
mysql_select_db("real");
$q=mysql_query("select * from reg") or die(mysql_error());
Here i tried...
print $log['file'];
but the result came as OX
plz give me an solution
because you insert to base at the same hex format $val = '0x' . bin2hex($f);
it's wrong, you must insert simply file content, returned file_get_contents function