php image function help please
Moderator: General Moderators
php image function help please
how do i output a php generated image to a file instead of just displaying it on the page?
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.