in reply to Re: Using GD in a CGI script to randomly select images fails...
in thread Using GD in a CGI script to randomly select images fails...
I thought of that.
At one point in my development of this script I did actually have a chdir to the gallery and eliminated it thinking there was some funky-delic permissioning issue going on with the server itself. The random selection code works. I'm just getting those nasty premature header ending errors.# further up in the code: my $dir = $ENV{HOME} . "/www/pix/gallery"; # this points to the only place we should be loading # images from. | | Loop through the directory and populate all the valid | file names into an array my $image=sprintf( "%s/%s",$dir,$imageStack[rand($top)]); # that picks a single name out of the list and prepends # the full path of the gallery directory to the name.
|
|---|