note 30688 deleted from control-structures.switch by betz
| From: | betz@php.net | Date: | Sun, 19 Oct 2003 08:49:33 +0000 |
| Subject: | note 30688 deleted from control-structures.switch by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58878@lists.php.net to get a copy of this message | ||
Note Submitter: kriek@jonkriek.com
----
PageXX.php was merely an example as file names are much more complex and diverse on my own server.
However if one were to use ONLY ordered file names such as this, that would be very useful.
<?php
switch ($_GET['go']) {
case $go: $go = $go . ".php";
if (file_exists("$go")) {
include("$go");
} else {
include("Main.php");
}
break;
}
?>
Might be better suited for that type of action.