slim框架post如何获取网页表单的参数值
比如一个简单的表单:
<form method="post" action="login">
<input type="text" name="text"/>
<input type="submit"/>
</form>
<?php
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$app->post(
'/login',
function() use ($app) {
$text = $app->request()->post('text');
echo $text;
);
$app->run();
我在slim项目中index.php中的$app -> post();怎么获取表单中text的值????