袖珍型 PHP5 框架 Slim Framework

fmms 13年前
     这是一个简单的 PHP5 框架用来创建 RESTful 的 Web 应用,示例代码:    <pre class="brush:php; toolbar: true; auto-links: false;"><?php  require 'Slim/Slim.php';  $app = new Slim();  $app->get('/hello/:name', function ($name) {      echo "Hello, $name!";  });  $app->run();  ?></pre>    <h3>特性列表</h3>    <ul class="features half">     <li>HTTP routing</li>     <li>Named routes</li>     <li>Route passing</li>     <li>Route redirects</li>     <li>Route halting</li>     <li>Middleware & Hooks</li>     <li>Custom views</li>    </ul>    <ul class="features half">     <li>HTTP caching</li>     <li>Signed cookies</li>     <li>Custom 404 page</li>     <li>Custom 500 page</li>     <li>Error handling</li>     <li>Logging</li>    </ul>    <h3 style="clear:both;">系统要求</h3>    <ul>     <li>Web server (URL rewrite module recommended)</li>     <li>PHP >= 5.1</li>     <li>libmcrypt > 2.4.x (if using encrypted cookies)</li>    </ul> 项目地址:    <a href="/misc/goto?guid=4958193645107649289" target="_blank">http://www.slimframework.com/</a>    <br />