What is the problem about reading binary images from a database ;? Php $ connmssql_connect (& quot; 192.168.1.70 & quot;, & quot; XXX & quot;, & quot; 123 & quot;) ordie (& quot; database opening error & quot;); mssql_select_db (& quot; XXX & quot;); mssql_query (& quo reading binary image from Database Display problem
$ Conn = mssql_connect ("192.168.1.70", "XXX", "123") or die ("database opening error ");
Mssql_select_db ("XXX ");
Mssql_query ("set names utf8 ");
$ SQL = "SELECT top 1 * FROM sync_info_BlogPic ";
$ Result2 = mssql_query ($ SQL );
Header ("Content-Type: image/jpg ");
$ Row2 = mssql_fetch_object ($ result2 );
Echo $ row2-> BlogPic_Content;
Error: Image Upload UPT or truncated
------ Solution --------------------
Error: image damaged or truncated
What type of fields do you use to save images?
------ Solution --------------------
How to read is not important, how to save it?
------ Solution --------------------
It must have been an issue with warehouse receiving. don't think about it.
------ Solution --------------------
The buffer provided by php to mssql may be too small.
------ Solution --------------------
Php. ini
[MSSQL]
; Valid range 0-2147483647. Default = 4096.
; Mssql. textlimit = 4096
; Valid range 0-2147483647. Default = 4096.
; Mssql. textsize = 4096