开发者

Insertion of image file to varbinary (max) field in ms sql server using php

开发者 https://www.devze.com 2023-01-29 09:45 出处:网络
I am able to convert image to binary format **<?php //$id = $_GET[‘id’]; //using sql query or other source get the dynamic image name or path

I am able to convert image to binary format

**<?php
//$id = $_GET[‘id’];
//using sql query or other source get the dynamic image name or path
$path = ‘../images/rose.jpg’;
$size = GetImageSize($path);
$mime = $size['mime'];
$data=file_get_contents($path);
header("Content-type: $mime");
 header('Content-Length: ' . 开发者_如何转开发strlen($data));
 echo $data;
?>**

How can I insert the binary format in ms sql server 2005 using php

Thanks for your time.

0

精彩评论

暂无评论...
验证码 换一张
取 消