setDefaultEntry() public static method

defaultMethod set
public static setDefaultEntry ( string $entry ) : boolean
$entry string
return boolean
示例#1
0
<?php

/**
 * sample to test
 *
 * http://localhost/samples/www/index.php/zone/default/entry/a/b/c
 * http://localhost/samples/www/index.php/zone-default-entry-a-b-c.html
 *
 */
require_once "global.php";
//SlightPHP::setDebug(true);
SlightPHP::setAppDir(ROOT_APP);
SlightPHP::setDefaultZone("index");
SlightPHP::setDefaultPage("main");
SlightPHP::setDefaultEntry("entry");
SlightPHP::setSplitFlag("-_.");
//{{{
SDb::setConfigFile(ROOT_CONFIG . "/db.conf");
SRoute::setConfigFile(ROOT_CONFIG . "/route.conf");
SRedis::setConfigFile(ROOT_CONFIG . "/redis.conf");
//}}}
if (($r = SlightPHP::run()) === false) {
    echo "404 error";
} elseif (is_object($r)) {
    var_dump($r);
} else {
    echo $r;
}
示例#2
0
<?php

/**
 * sample to test
 *
 * http://localhost/samples/www/index.php/zone/default/entry/a/b/c
 * http://localhost/samples/www/index.php/zone-default-entry-a-b-c.html
 *
 */
require_once "global.php";
SlightPHP::setDebug(true);
SlightPHP::setAppDir("app");
SlightPHP::setDefaultZone("controller");
SlightPHP::setDefaultPage("main");
SlightPHP::setDefaultEntry("index");
SlightPHP::setSplitFlag("-_.");
//{{{
SDb::setConfigFile(ROOT_CONFIG . "/db.ini.php");
//}}}
if (($r = SlightPHP::run()) === false) {
    echo "404 error";
} elseif (is_object($r)) {
    var_dump($r);
} else {
    echo $r;
}