-
or die() question
hello
i have seen "or die()" used in many examples and i am just wondering how this is used. It looks like something that can be very useful. When is the die() function executed and under what conditions.. also can the die() function be any peace of code.. like "echo()" or "something = something".
thank you
-
the die() function is executed when a statement is false.
So any function/statements that can produce a false value/return can have the die() function attached to it.
-
and if I remember right the die() function only writes to the error.log file on the server as it won't spit out any for the user except the usual, cannot connect error. the die function will write (sometimes in detail) on what the error was.