$img = @imagecreatetruecolor(32, 32) or return false;
Why doesn't this work?
I get a parse error, but the code looks ok?
The same with this:
imagefill($img, 0, 0, $tra开发者_StackOverflow中文版nsparent) or return false;
You can't use return like this. You must use an if statement instead:
if (!$img = @imagecreatetruecolor(32, 32)) {
return false;
}
精彩评论