Page 1 of 1

problem with imagecreatefromjpeg

Posted: Fri Apr 01, 2011 2:17 am
by helloise
i hasve the following code:

PHP Code:
$filename = "Rainbow-code-1_blck.jpg";
if (file_exists(sfConfig::get('sf_upload_dir') . '/rainbowcode/images/profilepics/'.$filename))
{
echo "file found";
$source = imagecreatefromjpeg($filename);
}
but i get the following warning:
Warning: imagecreatefromjpeg(Rainbow-code-1_blck.jpg): failed to open stream: No such file or directory in /home/helloises/traffic_2/phoenix/plugins/rainbowCodePlugin/lib/model/RcProfileTable.php on line 168

i dont understand my file does exist...it goes in to the if cos the echo executes
please help i am new to this and have no idea how to fix this
thank you

Re: problem with imagecreatefromjpeg

Posted: Fri Apr 01, 2011 12:04 pm
by McInfo
The string passed to file_exists() is different from the string passed to imagecreatefromjpeg().