A blank, black image!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

JellyFish wrote:I don't know how to check the error reporting.
You can edit your php.ini or add the line

Code: Select all

error_reporting(E_ALL);
to your script.
It would have told you about the missing $
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Post by Rovas »

I upload the image first, then run the resize script because I use the original as a larger version .

Code: Select all

//takes the name of the uploaded file
$filename=uploaded_file();
$path="/images/large/"';
$file=$path .$filename;
imgInfo=getimagesize($file);
if(imgInfo[2]==IMAGE_TYPE_JPEG) {imagecreatefromjpg($file);}
//and the rest
Another programmers do it "on the fly" like you want but I haven' t reached that level :(
Post Reply