PDA

View Full Version : cgi find file code


andi182
03-18-2006, 07:45 PM
hi there
basically i need to write a script which finds a file, however if it cant locate that first file it displays a second file
if this seems a little vague post a reply and i'll help the more i can
also, im quite new to perl so if you could if its not self explanitory could you write an explaination of how the script works.
many thanks

mlseim
03-18-2006, 09:26 PM
We need to know a few things...

Are the two files in the same directory?

Do you know the names of the two files ahead of time?

Are the two names always the same, or do they change?

Are you working within your own webhost, or are you
probing for files in someone else's directories?

I think you'll have to elaborate.

andi182
03-18-2006, 11:03 PM
yea the two files would basically be images to be displayed
they wouldnt be in the same directory. they'd be on two different hosts
but always called the same
if it couldnt find image1 on server 1
it'd find image1 on server 2
hope this helps
i would own both servers