需将字段设成image类型,其他操作可参照http://www.csdn.net/Expert/TopicView1.asp?id=1082524

解决方案 »

  1.   

    MSSQL数据库不同于MYSQL,它的image数据类型还需要初始化等,不好办呢
      

  2.   

    <?php
    //$contents就是从数据库读出的字符串//-----------读取
    $filename = "F:/mm/M23406.jpg";
    $fd = fopen ($filename, "r");
    $contents = fread ($fd, filesize ($filename));
    fclose ($fd);
    //将$contents存入数据库中即可
    //----------输出
    //从数据库读出数据赋给$contents
    $filename = "aaa1.jpg";
    $fd = fopen ($filename, "w");
    fwrite($fd,$contents);
    fclose ($fd);?>
      

  3.   

    难点不在这里,而是如何插入MSSQL数据库,如何取出还原