file_put_contents and createimagefromjpeg

Posted on 16th Feb 2014 by admin

All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename,$attachment_raw); //Give full path to $filename

I then do:
$im = imagecreatefromjpeg($path_to_image_directory . $filename);

However, I get errors when I do this. The $filename is the file that I just put into the $path_to_image_directory using file_put_contents.

Can you use these two things together?

Thanks.

Other forums