宝塔环境下composer升级
常用命令如下:
composer update
;
或者/usr/bin/composer self-update
;
命令。
composer update
;
或者/usr/bin/composer self-update
;
命令。
【图1】
php.ini
配置文件,宝塔环境直接在后台找即可,把环境中禁用的pcntl_signal_dispatch
删除并保存。
【图2】
图1
中的校验,出现图2
提示说明正常使用workerman
环境了。fileinfo
扩展。pcntl_alar
、pcntl_wait
fileinfo
扩展。./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- topthink/think-worker v3.0.4 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- topthink/think-worker v3.0.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- topthink/think-worker v3.0.2 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- topthink/think-worker v3.0.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- topthink/think-worker v3.0.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for topthink/think-worker ^3.0 -> satisfiable by topthink/think-worker[v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4].
To enable extensions, verify that they are enabled in your .ini files:
- /www/server/php/73/etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
JS
实时通信,两者比较:1、EventSource
是单向
通信的即 Server-->Client
发送数据流。
2、WebSockets
是双向
通信的,即 Server<--->Client
双工数据流。
https://developer.mozilla.org/zh-CN/docs/Server-sent_events/EventSource
https://developer.mozilla.org/zh-CN/docs/Web/API/WebSockets_API
ckplayer
传送门:ckplayer.com
SQL
命令及技巧:https://segmentfault.com/a/1190000023795564
用empty
判断各种特殊表达式是否为空的使用方法:
$a='';
$b=NULL;
$c=0;
$d=-1;
$e=false;
$f=true;
echo 'a is empty:'.empty($a).'<br/>';
echo 'b is empty:'.empty($b).'<br/>';
echo 'c is empty:'.empty($c).'<br/>';
echo 'd is empty:'.empty($d).'<br/>';
echo 'e is empty:'.empty($e).'<br/>';
echo 'f is empty:'.empty($f).'<br/>';
a is empty:1
b is empty:1
c is empty:1
d is empty:
e is empty:1
f is empty: