Gossamer Forum
Home : General : Perl Programming :

Change SSI error message?

Quote Reply
Change SSI error message?
Is there a way to change or delete the possiblility of the [An error has occurued...] message from a page? I am using SSI tags to call up ratings, and if something hasn't been rated yet, the SSI tag can't find the file, and produces the message.

Quote Reply
Re: Change SSI error message? In reply to
you should be able to add some basic logic to the script you are SSIing to stop the error.
make sure all of your variables are predeclared and that you aren't trying to do something like:
my $percent = $total / $val;
when $val is 0 (from no votes for example)

-- Gordon


s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';
Quote Reply
Re: Change SSI error message? In reply to
What I'm saying is that right now, say I have 2 apples. Apple A=Grannysmith and Apple B=Reddelicious. Apple A is currently rated 99/100, and the ssi script calls the file !-- #include virtual="Grannysmith.txt" -- But no one's rated Apple B yet, so the CGI script has not created Reddelicious.txt. Therefore, when I have the script calling it (so I don't have to go make a thousand text files by myself) it brings up the error.

Look, I'm not rating apples (duh) but is there a way around the message? Thanks!