The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
How do I easily check if one variable equals ANY of a list of values?
In my Custom HTTP Error Pages hack, I use a variable $e. The value of $e comes from the URL, as in http://www.yoursite.com/forums/httperror.php?e=404.
I have a check in the script that checks for if $e has a value or not, and if not, it's set to 404 (because the 404 page is the accepted generic page to use if the exact error cannot be determined or does not wish to be revealed). But I'd like to add another check that makes sure $e is set to an acceptable value, and if not, set it to 404. Is there an easy way to check if $e is set to ANY item in a list like 400, 401, 403, 404, 405, etc.? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|