I have the following snippet in my file:
if ($PATH_INFO == "") { $PATH_INFO = "/"; }
echo "PATH_INFO: $PATH_INFO<br>\n";
// All we want is the fist element, call it $section
list($section) = explode('/', substr($PATH_INFO,1));
if (is_int($section)) {
echo "section: $section<br>\n";
} else {
echo "Invalid section (NON_INT: $section)<br>\n";
}
Um, why does it fail when I hit the script with any INT?
For example: /script/1 fails. Is $section not an INT when parsed?
--
H | "Life is the art of drawing without an eraser." - John Gardner
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
Director of Internet Operations / SysAdmin . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]