//$contents就是从数据库读出的字符串-----------读取
$imgfile = "aaa.gif";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
//将$contents存入数据库中即可
----------输出
从数据库读出数据赋给$contents
$imgfile = "aaa.gif";
$fd = fopen ($filename, "w");
fwrite($fd,$contents);
fclose ($fd);
$imgfile = "aaa.gif";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
//将$contents存入数据库中即可
----------输出
从数据库读出数据赋给$contents
$imgfile = "aaa.gif";
$fd = fopen ($filename, "w");
fwrite($fd,$contents);
fclose ($fd);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货