Home > php教程 > PHP源码 > body text

Zan is a network service framework based on PHP coroutines, providing the simplest way to develop high-concurrency HTTP services or SOA services for C10K+.

WBOY
Release: 2016-08-04 08:53:37
Original
1513 people have browsed it
跳至 [1] [全屏预览]
<?php
namespace Com\Youzan\ZanHttpDemo\Controller\Index;
use Com\Youzan\ZanHttpDemo\DemoModule\Service\System;
use Zan\Framework\Foundation\Domain\HttpController as Controller;
class IndexController extends Controller {
    public function index()
    {
        $systemService = new System(); 
        yield $systemService->sleep(20);
        $this->assign('testResult', 'hello, zanphp!');
        yield $this->display('DemoModule/Test');
    }
}
Copy after login
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!