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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

asp.net ajax - Jquery scroll to element just goes to top of page -