Home > Backend Development > PHP Tutorial > lime framework

lime framework

WBOY
Release: 2016-06-23 13:20:02
Original
986 people have browsed it

Lime

Lime 是一个 PHP 的微框架, 帮助你快速构建简单但强大的 RESTful 风格的网页应用和 API。它提供路由(routing)、依赖注入(dependency injection)、中间件(middleware)、视图继承、视图片段和安全 cookies 等功能。

系统需求

  • PHP >= 5.4.0

用法

一个 Lime 应用主要包含三部分,生成 Lime 应用实例,定义路由,执行应用。

// 加载 Lime 框架require 'Lime/Lime.php';// 生成一个 Lime 应用实例$app = new \Lime\Lime();// 定义一个 HTTP GET 请求路由:$app->get('/', function() {    echo 'hello world';});// 执行 Lime 应用$app->run();
Copy after login

官方网站:http://www.open-open.com/lib/view/home/1451896420964


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template