$filehandler=fopen("E:\\ApacheRoot\\tmp\\".$filename, "rb");
$IntomysqlPicture=fread($filehandler, $FileSize);
$handler=mysql_connect("localhost","root","")
or die(mysql_error());
@mysql_select_db("task")
or die(mysql_error());
$strInsert="INSERT INTO `images` (theimage) VALUES ($IntomysqlPicture)";
mysql_query($strInsert,$handler)
or die(mysql_error());
mysql_close($handler);
$IntomysqlPicture=fread($filehandler, $FileSize);
$handler=mysql_connect("localhost","root","")
or die(mysql_error());
@mysql_select_db("task")
or die(mysql_error());
$strInsert="INSERT INTO `images` (theimage) VALUES ($IntomysqlPicture)";
mysql_query($strInsert,$handler)
or die(mysql_error());
mysql_close($handler);
请大家帮忙 谢谢
请注意对$IntomysqlPicture中的特殊字符转义