function W3SelectPage() { ############################################# # User function logic should be added below # ############################################# # e.g. # global $w3UI; if (W3IsEmptyRequest()) { return W3CreateUI("uidPageDebug"); } else { if (preg_match(W3CreateAPIReg("aidPage"), $_SERVER["REQUEST_URI"], $matches) and array_key_exists($matches[1], $w3UI)) { return W3CreateUI($matches[1]); } } return W3CreateUI("uidPageError"); ############################################# # User function logic should be added above # ############################################# }
<?php # # This is the main entry for all request # So any global variable, function or any include could be used here # require "W3Helper.php"; if (W3IsEmptyRequest()) { require "W3Main.html"; } else { if (!W3HandleRequest()) { $msg = "NOT handled request: " . $_SERVER["REQUEST_URI"]; W3LogError($msg); echo $msg; } }