0
我呼应从BLOB列收到从MySQL这样的数据:PHP调整大小的团块图像
<?php
$con = mysql_connect("localhost","username","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mydb", $con);
if(isset($_GET['imageid'])){
$img=$_GET['imageid'];
$sql="SELECT image FROM vrzgallery WHERE id=$img";
$que=mysql_query($sql);
$ar=mysql_fetch_assoc($que);
echo $ar['image'];
header('Content-type: image/jpeg');
}
?>
问题:我怎样才能减少我的形象的说像500像素X 500像素
当然上面是一个错字,并且要调用'标题()''之前回波$ AR [ '图像']'而不是之后? –
[用PHP调整图像大小]的可能的副本(http://stackoverflow.com/questions/7393319/resize-images-with-php) –
另一个示例http://stackoverflow.com/questions/7551608/image-resize- with -php –