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 –