看板 PHP 關於我們 聯絡資訊
寫了一個小小的測試 但不知哪裡出了問題,現在大致猜想是沒接收到值的問題 故想問問大家到底是哪裡出了錯 以下是程式 //465.php <? $name = 1; ?> <img src="789.php?name=<? echo $name; ?>" border="0"> 將$name值傳送到789.php //789.php <? $img_type = "GIF"; $photo_path = "456photo/1.gif"; $src_img = imagecreatefromgif($photo_path); $new_W = imagesx($src_img) * 0.2; $new_H = imagesy($src_img) * 0.2; if ( $new_W < 150 ) { $new_H = ( 150 / $new_W ) * $new_H; $new_W = 150; } $dst_img = imagecreatetruecolor($new_W, $new_H); imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $new_W, $new_H, imagesx($src_img), imagesy($src_img)); header("Content-type: image/".$img_type); if ( $img_type == "JPEG" ) imagejpeg($dst_img); elseif ( $img_type == "PNG" ) imagepng($dst_img); else imagegif($dst_img); imagedestroy($dst_img); imagedestroy($src_img); ?> 麻煩各位大大幫我看看到底哪裡出了問題 如果可以請幫我講解一下,謝謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.142.108.38
gmobug:你的789.php裡面似乎沒有出現$_GET['name'] or $name 08/16 04:24