Save PDF as a blob in a database using PHP? -
i have pdf file on server want select , transform blob insertion database (using insert into
command). first problem getting hold of pdf using php. know done file_get_contents()
function, not understand parameters needs.
$fp = fopen($filelocation, 'r'); $content = fread($fp, filesize($filelocation)); $content = addslashes($content); fclose($fp);
you can save $content blob field in mysql
Comments
Post a Comment