Jump to content

Function name must be a string issue


max22

Recommended Posts

Does anyone see anything wrong with this code?  It's an image upload/thumbnail script.

I get a Function name must be a string error on the last line of the code:

 

Code snippet:

 

$ou = imagecreatetruecolor($w, $h);

imagealphablending($ou, false);

$funcall = "imagecreatefrom$imtype";

imagecopyresampled($ou, $funcall($fromfile), 0, 0, 0, 0, $w, $h, $img[0], $img[1]);

$funcall = "image$outype";

$funcall($ou, 'uploaded/cache/' . $_GET['w'] . '-' . md5($fromfile));

}

$funcall($ou);          <----------- This throws the error, can't figure out why.

 

Link to comment
https://forums.phpfreaks.com/topic/194171-function-name-must-be-a-string-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.