Heim >Backend-Entwicklung >PHP-Tutorial >php缩略图的有关问题
php缩略图的问题
以下是我的代码:
1.2.$ef='index\images\m_1307414811439.jpg';
3.$bs="";
4.$rr=getimagesize($ef);
5.$new=imagecreatetruecolor(300,300);
6.imagecopyresized($new,$bs,0,0,0,0,300,300,$rr[0],$rr[1]);
7.header("content-type:image/jpeg");
8.imagejpeg($new);
9.?>
出现的问题是6,7行报错,还有乱码
Warning: imagecopyresized(): supplied argument is not a valid Image resource in D:\PHP\r.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at D:\PHP\r.php:6) in D:\PHP\r.php on line 7
????JFIF??>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ??C $.' ",#(7),01444'9=82<.342>