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

4x4 Matrix in Python -

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -

python - PyInstaller UAC not working in onefile mode -