Home >Backend Development >PHP Tutorial >php缩略图的有关问题

php缩略图的有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:10:431365browse

php缩略图的问题
以下是我的代码:

1.2.$ef='index\images\m_1307414811439.jpg';
3.$bs="php缩略图的有关问题";
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>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn