亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

? PHP ????? Workerman thinkphp? ?? ???? ???? ??

thinkphp? ?? ???? ???? ??

Nov 30, 2019 pm 04:53 PM
thinkphp workerman

Workerman Getting Started Tutorial ????? Workerman? thinkphp? ???? ??? ???????. ??? ???? ?????.

thinkphp? ?? ???? ???? ??

Workerman? ????? pcntl? event ?? libevent? ???? ???.

pcntl ?? ??:

php-5.5.20? ?? ?????. ?? ??? ??? PHP ????? ?? ????.

1. PHP ?? ??? ?? php-5.5.20/ext/pcntl/directory cd php-5.5.20/ext/pcntl/

? ?????. 2. phpize ????? ?? /usr/local/? ????? phpize ??? ?????. php-5.5.20/bin/phpize

3. ./configure --with-php-config=PHP ?? ?? ??? ?????. ?: ./configure --with-php-config=/usr/local/php- 5.5.20/bin/php-config

4. ??? ? ?? make && make install /ext/pcntl/modules/pcntl.so? ???? ???? ??? ????

5. php echo "extension=pcntl.so" >> ; /etc/php.ini (?? ???? php.ini ?? ??? ??? php --ini ??? ?????.)

6 nginx? ?? ?????. nginx -s reload

7. ??? ?? ps -aux | grep pcntl

??? 5.3?? ?? ??? ???? ??? ? ????:

yum install php-cli php-process git gcc php-devel php-pear libevent-devel php-pdo php-mysql_pdo -y

event ?? ??:

1. yum install libevent-devel -y

2. pecl ?? ???

?: libevent OpenSSL ?? ?? [yes]: no? ???? Enter? ????. ??? ??? Enter? ????

3. echo Extension=event.so > /etc/php.ini

libevent ?? ??:

1.yum install libevent-devel

2.pecl ?? ??://pecl.php.net/libevent-0.1.0 //libevent ?? ?? [?? ??]: Enter? ????

3. PHP ???? lib/php/extensions/no-debug-non-zts- libevent.so? 20121212 ???? ??? ?????? 4. ??? ?? ????? ??? php -v ??? ??????.

Workerman? Thinkphp? ?????.

(??: workerman tutorial) 1. ????? Workerman ????? ???? ThinkPHPLibrary ????? ????

2. LibConstants.php? ??? Worker ????? ??? ?? ??? *.class.php? ?????.

3. ???? ?? ????? ?? ??? ???? Worker.php ??? ????.

<?php
header("Content-type: text/html; charset=utf-8");
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// 應(yīng)用入口文件
define(&#39;BIND_MODULE&#39;, &#39;Worker&#39;);
define(&#39;BIND_CONTROLLER&#39;, &#39;Worker&#39;);
define(&#39;BIND_ACTION&#39;, &#39;Start&#39;);
//define(&#39;APP_MODE&#39;,&#39;cli&#39;);
//ThinkPHP的其他設(shè)定
define( &#39;APP_PATH&#39;, dirname(__FILE__).&#39;/Application/&#39; );
require dirname( __FILE__).&#39;/ThinkPHP/ThinkPHP.php&#39;;
?>

4. ? ??? ???? ???? ??? Worker

5? ?????. ?? ??? ??? ??? ??:

<?php
namespace Worker\Controller;
use Think\Controller;
use Workerman\Worker;
class WorkerController extends Controller{
    public function Start() {
        $worker = new Worker(&#39;text://0.0.0.0:8989&#39;); //實例化Worker,并設(shè)置協(xié)議、IP和端口(地址和端口自定義)
        $worker->count = 4;
        $worker->onMessage = array($this, &#39;onMessage&#39;);
        //worker的其它回調(diào)方法可以參考o(jì)nMessage
        Worker::runAll();
    }
    public function onMessage($connection, $data)
    {
        $connection->send(&#39;hello&#39;);
    }
    
}
 ?>

6. Linux ???? ???? ?? 8989

iptables -I INPUT -p tcp --dport 8989 -j ACCEPT

7? ???. Enter ???? ?? ????? ?? ??? ?????.

php worker.php start

? ?? ??? ???? OK? ?????. ? ?? ??? ???? telnet 127.0.0.1 8989? ????

Workerman ??? MySQL? ??????.

1. pdo ? pdo_mysql ?? ?????. ?? ??
2. config.php? ?????? ?? ??? ?????. Worker ??? Conf ????

3. ?? ??? localhost? ???? ?? IP127.0.0.1? ?????.

4. ?????? ?? ? Thinkphp? ?? Db ???? ??? ? ????

? ??? thinkphp? ?? ???? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1597
29
PHP ????
1488
72
???
Workerman ???? ?? ??? ? ???? ?? Workerman ???? ?? ??? ? ???? ?? Nov 08, 2023 pm 06:02 PM

Workerman ???? ?? ??? ? ????? ????? ?? ?? ??? ?????. ??: Workerman? ???? ????? ???? ?? ??? PHP ??? ???? ?? ????????. ?? ???? ?? ??? ? ????? ???? ?? ?? ?????. ? ????? Workerman ?????? ???? ?? ??? ? ????? ???? ??? ???? ???? ?? ??? ?????. 1. ?? ???: ?? ???? ?? ???? ?? ??? ??? ???? ??? ????. ??? ?????

thinkphp ????? ???? ?? thinkphp ????? ???? ?? Apr 09, 2024 pm 05:33 PM

ThinkPHP ????? ????? ??? ?????: Composer? ????, ???? ????? ???? php bin/console? ????, ?? ???? ??? http://localhost:8000? ?????.

thinkphp?? ?? ??? ????. thinkphp?? ?? ??? ????. Apr 09, 2024 pm 06:09 PM

ThinkPHP?? ??? PHP ????? ??? ?? ??? ????. ??? ???? 3.2, 5.0, 5.1, 6.0? ????, ??? ??? ??? ???? ??? ??? ???? ? ?????. ?? ?? ??? ThinkPHP 6.0.16???. ??? ??? ? PHP ??, ?? ?? ?? ? ???? ??? ??????. ??? ??? ??? ???? ?? ?? ??? ???? ?? ????.

thinkphp? ???? ?? thinkphp? ???? ?? Apr 09, 2024 pm 05:39 PM

ThinkPHP Framework? ???? ???? ??: ThinkPHP Framework? ?? ????? ?????? ??? ???. ThinkPHP ?? ????? ???? ?? ???(?? ??)? ????. ?????? ?? ????? ?????. ? ??? ?????. ThinkPHP ??????? ??????. ThinkPHP ?????? URL? ???? ?????.

laravel? thinkphp ? ?? ?? ? ???? laravel? thinkphp ? ?? ?? ? ???? Apr 09, 2024 pm 03:18 PM

Laravel? ThinkPHP ?????? ?? ??: ThinkPHP? ????? ??? ? ??? ??? ?? Laravel?? ??? ????. Laravel? ? ????? ??? ??????? ?? ThinkPHP? ? ??? ? ????.

thinkphp? ???? ?? thinkphp? ???? ?? Apr 09, 2024 pm 05:42 PM

ThinkPHP ?? ??: PHP, Composer ? MySQL ??? ?????. Composer? ???? ????? ????. ThinkPHP ?????? ???? ?????. ?????? ??? ?????. ?????? ??? ?????. ??????? ???? http://localhost:8000? ?????.

??? ??? ? ?? ?? ? ???? ??? ??? ? ?? ?? ? ???? Apr 09, 2024 pm 07:00 PM

Swoole? Workerman? ?? ??? PHP ?? ????????. ??? ??, ??? ?? ? ????? ? ??? Swoole? ?? ?? ?? ??? ?? ???? ???? ?? ????? ?????. Workerman? ?? ???? ?? ??? ??? ???? ????? ? ??? ???? API? ?? ???? ? ??? ??? ???? ?????.

thinkphp ??? ????? thinkphp ??? ????? Apr 09, 2024 pm 05:24 PM

ThinkPHP? ?? ????, ?? ???, ?? ?? ? ?????? ???? ?? ??? ?? ??? PHP ????????. ?? ?? ???? ??? ?? 10,000? ??? ??? ??? ? ??? JD.com, Ctrip? ?? ??? ? ??? ? ?????? ????? ?? ?? ?????? ?? ?????.

See all articles