I got this code from the FAQ board:
if (-e "$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[1]") {
print qq|<img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[1]">|;
}
else {
print qq|<img src="http://www.wdu.net/images/sfimages/blank.gif">|;
}
print qq|
but it doesn't work. Always shows my alternate (blank.gif) image even if there is a file there.
This works:
So I know it has something to do with the other peice of code. I need the e operator in there so it doesnt show little red x's when the user doesnt upload all the files. I cant figure out whats wrong with it.
Code:
|; if (-e "$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[1]") {
print qq|<img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[1]">|;
}
else {
print qq|<img src="http://www.wdu.net/images/sfimages/blank.gif">|;
}
print qq|
but it doesn't work. Always shows my alternate (blank.gif) image even if there is a file there.
This works:
Code:
<img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[1]">So I know it has something to do with the other peice of code. I need the e operator in there so it doesnt show little red x's when the user doesnt upload all the files. I cant figure out whats wrong with it.