Giter Club home page Giter Club logo

slim-swoole's Introduction

Slim 3 MVC Skeleton With Swoole

##Features

  • Quickly setup and start working on a new Slim Framework 3 .
  • Use the latest Slim 3 with the PHP-View template render.
  • It also uses the Monolog logger.
  • It can run well with swoole or php-fpm.
  • Use the lightest PHP database: Medoo
  • Built for Composer

##Requirements

Install the Application

git clone https://github.com/kcloze/slim-swoole.git  my-app-name
cd my-app-name
composer update
php public/server.php

##Check

Docs

slim-swoole's People

Contributors

kcloze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slim-swoole's Issues

这里框架会有问题, $_GET类似的超全局变量每次访问都是常驻内存的. 并发的时候框架没有任何意义了就

<?php
$http = new Swoole\Http\Server('0.0.0.0', 9501);

$http->set(
    [
        'worker_num'    => 5,
        'daemonize'     => false,
        'max_request'   => 10,
        'dispatch_mode' => 1,
    ]
);
$http->on('request', function ($request, $response) {
    if ($_GET) {
        return $response->end("继续保留上一个$_GET : " . var_export($_GET,true));
    }
    if (isset($request->get)) {
        foreach ($request->get as $key => $value) {
            $_GET[$key] = $value;
        }
    }
    return $response->end("生成$_GET : " . var_export($_GET,true));
});

$http->start();

就这样多访问几次就好了.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.