****************************编辑***********************
我正在使用ODBC,发现一个字段的读取量不能超过4096
有什么建议吗
**************************编辑*************************
我正在从数据库中读取图像
$image=$row["image-contents"];
现在尝试将文件写入磁盘
$image_name="test.jpg";
$file = fopen( "images/".$image_name, "w" );
fwrite( $file, $image);
fclose( $file );
问题是,创建的文件只有4096字节,映像文件已损坏,因为$image大于4096。
我现在知道fwrite用块来写,但我不知道怎么写。
救命啊!
最佳答案
也许试着用
http://php.net/manual/en/function.file-put-contents.php
关于php - 写入大于4096的图像文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2738504/