Re: Cant Display the image...
[email protected] (Lars Haugseth)
| Newsgroups | perl.beginners.cgi |
|---|---|
| Organization | Linux Private Site |
| Message-ID | <[email protected]> |
* [email protected] (jeevs) wrote: > > qx{rm -rf /var/www/images/file.png}; Use Perl: unlink '/var/www/images/file.png'; > qx{chmod -R 777 /var/www/images/file.png}; Use Perl: chmod 0777, '/var/www/images/file.png'; What happens when two users try to access your CGI script simultaneously? You could include something unique in your filename, like this: my $filename = '/var/www/images/' . $$ . time() . 'png'; A better solution: call your own CGI script with some parameter that makes it output the raw PNG data and use that URL in the <img>-tag. Then you won't have to worry about creating files on the server at all. -- Lars Haugseth "If anyone disagrees with anything I say, I am quite prepared not only to retract it, but also to deny under oath that I ever said it." -Tom Lehrer