zoukankan      html  css  js  c++  java
  • Silex 基于Symfony2组件的微型框架

    Silex 是一个PHP 5.3的微型框架。基于Symfony2 和 Pimple 构建。同时还受到sinatra的启发。

    A microframework provides the guts for building simple single-file apps. Silex aims to be:

    • Concise: Silex exposes an intuitive and concise API that is fun to use.
    • Extensible: Silex has an extension system based around the Pimple micro service-container that makes it even easier to tie in third party libraries.
    • Testable: Silex uses Symfony2's HttpKernel which abstracts request and response. This makes it very easy to test apps and the framework itself. It also respects the HTTP specification and encourages its proper use.

    示例代码:

    1 require_once __DIR__.'/../vendor/autoload.php'; 
    2 
    3 $app = new Silex\Application(); 
    4 
    5 $app->get('/hello/{name}', function($name) use($app) { 
    6     return 'Hello '.$app->escape($name); 
    7 }); 
    8 
    9 $app->run(); 
  • 相关阅读:
    android 源码
    android 保护
    电池信息 显示
    RGB、HSB、HSL 互相转换算法
    网页美工
    css 设计标准
    js 封闭 小结
    格式转换工具
    网页设计规范
    瀑布流分析
  • 原文地址:https://www.cnblogs.com/daly2008/p/2970597.html
Copyright © 2011-2022 走看看