having problems using imagejpeg() function<

ok, I have 2 questions:

1. I try to use imagejpeg() function like this:
imagejpeg($thumb, "string");
but it throws me this error:
Warning: imagejpeg(): Unable to open 'string' for writing in .....

should "string" actualy be a file with writing permissions or there is something else wrong. and if so what's the problem ?

2. Warning: chmod(): Operation not permitted in ....
how come ?

thanks1. according to the doc, yes it should be a file that your webuser have the right for writing.

2. the php chmod function? or the unix command line chmod function?
maybe a. your not the owner of the file you want to chomd
b. may be disabled in php.iniif you want to just output it without actually writing to a file just use it without the string, but make sure you send a jpeg image headerfinally I managed to get the script done and use that function corectly.

thanks for the help
 
Back
Top