file_put_contents and createimagefromjpeg


Posted on 16th Feb 2014 07:03 pm 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.

320 Like 13 Dislike
Previous php-forum Next php-forum
Other php-forum

Why do I get this error?
Error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or

IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST metho

How to add functionality to a simple php calender?
Hello everyone,

I have just finished creating a simple php calander. Can someone point

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments and

Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash