启动 hyperf 项目
启动 hyperf 项目
php -d swoole.use_shortname=Off ./bin/hyperf.php start
/usr/local/php72/bin/php -d swoole.use_shortname=Off /var/www/html/hyperf-skeleton/bin/hyperf.php start -c
/usr/local/php72/bin/php -d swoole.use_shortname=Off /var/www/html/hyperf-stw/bin/hyperf.php start
/usr/local/php72/bin/php -d swoole.use_shortname=Off /var/www/html/hyperf-skeleton/bin/hyperf.php start -c
生成一个模型
默认目录
php bin/hyperf.php gen:model user
指定目录
php bin/hyperf.php gen:model /Rng/Jd/user
生成Reuest在指定目录
php bin/hyperf.php gen:request /Rng/Jd/OrderRequest
php bin/hyperf.php gen:request /OrderRequest
创建项目
项目名:hyperf-stw
composer create-project hyperf/hyperf-skeleton hyperf-stw
启动项目
php -d swoole.use_shortname=Off /var/www/html/hyperf-stw/bin/hyperf.php start -c
热更新监控
/usr/local/php72/bin/php /var/www/html/hyperf-stw/watch
退出监听
Control + C
热更新监控
#综合案例
/usr/local/php72/bin/php /var/www/html/hyperf-skeleton/watch
#临时工
/usr/local/php72/bin/php /var/www/html/hyperf-stw/watch
/var/www/html/hyperf-skeleton/vendor/bin/init-proxy.sh && /usr/local/php72/bin/php -d swoole.use_shortname=Off /var/www/html/hyperf-skeleton/bin/hyperf.php start
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: