Php extracts binary image processing code from the database. The image. php file copy code is as follows :? Php $ conn @ mysql_connect (localhost, root, 123) ordie (server connection error !); Link to the database @ mysql_select_db (upload, $ conn) o image. php file
The code is as follows:
$ Conn = @ mysql_connect ("localhost", "root", "123") or die ("server connection error! "); // Link to the database
@ Mysql_select_db ("upload", $ conn) or die ("no database found! ");
$ Query = "select * from upfile where ftag = $ fn ";
$ Result = mysql_query ($ query );
If (! $ Result) die ("error: mysql query ");
$ Num = mysql_num_rows ($ result );
If ($ num <1) die ("error: no this recorder ");
$ Data = mysql_result ($ result, 0, "picture ");
Header ("Content-type: image/JPEG", true );
Echo $ data;
?>
Above is image extraction
Foreground files
The code is as follows:
">
The pipeline code is as follows :? Php $ conn = @ mysql_connect ("localhost", "root", "123") or die ("server connection error! "); // Link to the database @ mysql_select_db (" upload ", $ conn) o...