I have a MySQL table in which some data blob data is stored in a cell.
I tried to echo it.
But I don’t know about the mime type of that data. How do I decide the mime type from the given blob data?
I tried this code but don’t know about the mime type of blob:
<?php
mysql_connect("localhost","root","");
mysql_select_db("contents");
$sql="SELECT * FROM `contents` limit 1";
$result=mysql_query($sql);
$row=mysql_fetch_assoc($result);
echo $row['html']
?>
You must add mime with insert “blob” in db for if you force ,you can choose this way :
This way is not good , because have many usage , but is possible.
I offer you update table and add mime-type and edit all record by top code …
And you have second way and use :
This is force download header and can save files in user’s PC.