???????????·??
????$app->get(
????'/post'??
????function () {
????echo 'This is a POST route';
????}
????);
????????http://localhost/lims/index.php/post·??
????????This is a POST route
????????display
$app->get('/bar'?? function (){
// echo $_SERVER['SCRIPT_NAME'];
// echo $_SERVER['PHP_SELF'];
//<-- Should not be in response body!
// $app->redirect($_SERVER['SCRIPT_NAME'].'/');
$view = new SlimView();
$prop1 = new ReflectionProperty($view?? 'data');
$prop1->setAccessible(true);
$prop1->setValue($view?? new SlimHelperSet(array('foo' => 'bar'??'ss'=>array('foo'=>'barsss'))));
$prop2 = new ReflectionProperty($view?? 'templatesDirectory');
$prop2->setAccessible(true);
$prop2->setValue($view?? dirname(__FILE__) . '/tests/templates');
$view->display('test.php');
});
????????http://localhost/lims/index.php/bar
????????test output barsss
????????
????????redirect
????$app->get('/bar'?? function (){
????$app->redirect($_SERVER['SCRIPT_NAME'].'/');
????});
????????????棬??????slim??????k?????????????????
??????????http://pan.baidu.com/s/1bnpTY71