第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

找不到那錯(cuò)了?

<?php

class Image{

//內(nèi)存中的圖片

private $image;

//圖片基本信息


private $info;

/**

*打開(kāi)一張圖片,讀取到內(nèi)存中

**/

public function __construct($src){

$info=getimagesize($src);

$this->info=array(

'width'=>$info[0],

'height'=>$info[1],

'type'=>image_type_to_extension($info[2],false),

'mime'=>$info['mime']

);

$fun="imagecreatefrom{$this->info['type']}";

$this->image=$fun($src);

}

/**

*壓縮圖片

*/

public function thumb($width,$height){

$image_thumb=imagecreatetruecolor($width,$height);

imagecopyresampled($image_thumb,$this->image,0,0,0,0,$width,$height,$this->info['$width'],$this->info['$height']);

imagedestroy($this->image);

$this->image=$image_thumb;


}

/**

*瀏覽器顯示圖片

*/

public function show(){

header("Content-type: " . $this->info['mime']);

$funs="image{$this->info['type']}";

$funs($this->image);


}

/**

*保存圖片

*/

public function save(){


$funs="image{$this->info['type']}";

$funs($this->image,$newname.'.'.$this->info['type']);


}

/**

*銷(xiāo)毀圖片

*/

public function __destruct(){

imagedestroy($this->image);

}

}


?>


正在回答

2 回答

保存圖片方法中 ?public function save($newname),你少了參數(shù)$newname。

0 回復(fù) 有任何疑惑可以回復(fù)我~

錯(cuò)誤提示是什么?

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

找不到那錯(cuò)了?

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)