ahmetkapikiran/slim-cli-environment

该软件包的最新版本(dev-master)没有可用的许可信息。

从命令行运行 Slim

该软件包的官方仓库似乎已消失,因此该软件包已被冻结。

dev-master 2014-10-29 20:44 UTC

This package is not auto-updated.

Last update: 2023-01-03 00:26:40 UTC


README

如何使用?

$cliEnvironment = new \Slim\Extras\Environment();

$app = new \Slim\Slim(array(
    'environment' => $cliEnvironment
));
$app->get(
    '/hello/:name',
    function ($name) {
        echo "Hello, $name";
    }
);
$app->run();

命令行

php test.php hello Ahmet
#Output
Hello, Ahmet