月度归档:2022年10月

manjaro 安装 php-swoole 扩展的方法

pacman/yay 安装

sudo pacman -S aur/php-swoole
#或者
yay -S aur/php-swoole

pecl 安装

yay -S php-pear
pecl install swoole

通过 PECL 安装 Swoole 时,在安装过程中它会询问是否要启用某些功能,这也可以在运行安装之前提供,例如:

pecl install -D 'enable-sockets="no" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="yes"' swoole

#或者
pecl install --configureoptions 'enable-sockets="no" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="yes"' swoole

浏览器远程调试

确保远程页面的主机可以被访问(例如在同一内网,或USB连接),打开 edge 浏览器,访问 edge://inspect/#devices ,找到要调试的页面,点击 inspect 即可远程调试。

chrome 浏览器访问 chrome://inspect/#devices