index.php
複製程式碼 程式碼如下:
$output = "";
if(isset($_GET['action'])&&$_GET['action'] == 'make'){
if(isset($_FILES['upimage']['tmp_name']) && $_FILES['upimage']['tmp_name'] && is_uploaded_file($_FILES['upimage'] && is_uploaded_file($_FILES['upimage']['tmpage']['t)
exit();
}
$fileext = array("image/pjpeg","image/gif","image/x-png");
$fileext)){
echo "你上傳的檔案格式不正確 僅支援 jpg,gif,png";
🎜> if($im = @imagecreatefrompng($_FILES ['upimage']['tmp_name']) or $im = @imagecreatefromgif($_FILES['upimage']['tmp_name']) or $im = @imagecreatefromjpeg($_FILES['upimage'][' )){
$imginfo = @getimagesize($_FILES['upimage']['tmp_name']); }
switch($_POST[ $resize_im = @imagecreatetruecolor(16,16 ); 2;
$size = 32;
$resize_im = @imagecreatetruecolor (48 .48);
$size = 48;
$resize_im = @imagecreatetruecolor(32,32);
break ;
}
$resize_im,$im,0,0,0,0,$size,$size,$imginfo[0],$imginfo[1]);
= new phpthumb_ico();
$gd_image_array = array($resize_im); array) );
$filename = "temp/".date("Ymdhis ").rand(1,1000).".ico";
if(file_put_contents($filename, $icon_data)){ 另存為儲存至本機
點選下載";
🎜> echo "產生錯誤請重試!";
}
}
}
?>
ICO图标在线转换