Page 1 of 1
php image function help please
Posted: Tue Jan 27, 2004 10:37 pm
by duroo
how do i output a php generated image to a file instead of just displaying it on the page?
Posted: Wed Jan 28, 2004 4:06 pm
by pickle
First, don't output the header that says the file is an image. Second, in the image creation call, imagepng,imagejpeg, or imagegif, put in a second argument that is the file name you want to create. I have heard of problems that people can't write to the file. A solution to THAT problem is to create a new directory with user, group, and world read/write/execute functions, and store the image in that directory. I found this out on php.net, so this rough solution is not mine.