Insertion of image file to varbinary (max) field in ms sql server using php
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.
精彩评论