taviroquai/duality-demo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

taviroquai/duality-demo

最新稳定版本:v1.0.0

Composer 安装命令:

composer require taviroquai/duality-demo

包简介

Project for Duality PHP Framework

README 文档

README

Install

  1. Download zip file and extract to an Apache web directory
  2. Install dependencies with composer: php composer.phar install
  3. Enable mod rewrite on Apache webserver
  4. Edit config/app.php and change your local settings
  5. Open in browser http://localhost/duality-demo/

Minimal API Usage Example

    // Include local configuration
    $config = array(
    'server' => array(
            'url' => '/duality-demo',
            'hostname' => 'localhost'
        )
    );
        
    // Load dependencies
    require_once './vendor/autoload.php';
      
    // Create a new application container
    $app = new \Duality\App(dirname(__FILE__), $config);

    // Get server and request
    $server = $app->call('server');
    $request = $server->getRequestFromGlobals($_SERVER, $_REQUEST);

    // Validate HTTP request
    if (!$request) die('HTTP request not found!');

    // Set request
    $server->setRequest($request);
     
    // Define default route
    $app->call('server')->setHome(function(&$req, &$res) {
       
        // Tell response what is the output
        $res->setContent('Hello World!');
    });
        
    // Finaly, tell server to start listening
    $app->call('server')->listen();

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-12-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固