存储图片

把图片保存在mysql5.0数据库中:

 use zhangwei;

create table image(

     id int  auto_ increment   primary key,

     name varchar(20),

     img  Blob);

 

<img alt="" src="showImage.do" width="60" height="80">显示图片

 

<form action="addImage.do" name="imageForm">
  <input type="file" name="img"   >
  <input type="image" value="" name="imgsub" >
 </form>保存图片到mysql

 

 

你可能感兴趣的:(mysql)