renlight10 / bproccess
1.0.1
2017-01-10 18:33 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2022-02-01 13:04:28 UTC
README
php后台进程包装器的维护 #88704
- require
- Linux
- nohup
- 新功能
- 日志输出
- 读取输出日志
安装
composer require renlight10/bproccess
使用
use renlight10\BProccess\BProccess; $proccess = new BProccess(command,locationfile=optional); echo $proccess->getPid();
如果您已经有了pid
use renlight10\BProccess\BProccess; $proccess = new BProccess; $proccess->setPid(int);
可能的方法
- getPid() - 获取进程ID
- setPid(int) - 设置进程ID
- status() - 检查进程状态
- start() - 启动进程(当命令在构造函数中时,进程会自动启动)
- stop() - 停止进程
- read("位置文件") - 读取输出日志
使用此方法来安全地处理进程参数的用户输入。