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 -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -