?php $Picture = './all-index-right-pic0.jpg'; If($Picture != none) { $PSize = filesize($Picture); $mysqlPicture = fread(fopen($Picture, r), $PSize); //可将 $mysqlPicture 存入数据库,当然字段的是2进制的 //读取出来的还原操作,和验证码的实现机
$Picture = './all-index-right-pic0.jpg';
If($Picture != "none") {
$PSize = filesize($Picture);
$mysqlPicture = fread(fopen($Picture, "r"), $PSize);
//可将 $mysqlPicture 存入数据库,当然字段的是2进制的
//读取出来似的还原操作,和验证码的实现机制差球不多啊
Header( "Content-type: image/gif");
echo $mysqlPicture;
}else {
echo"You did not upload any picture";
}
?>