renlight10 / BProccess

php background proccess

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Maintenance for php background process wrapper #88704

  • require
  • Linux
  • nohup
  • new function
  • log output
  • read output log

Install

composer require renlight10/bproccess

Usage

use renlight10\BProccess\BProccess;
$proccess = new BProccess(command,locationfile=optional);
echo $proccess->getPid();

if you already have pid

use renlight10\BProccess\BProccess;
$proccess = new BProccess;
$proccess->setPid(int);

possible method:

  • getPid() - get process id
  • setPid(int) - set process id
  • status() - check process status
  • start() - start process (process auto start when command in construct)
  • stop() - stop process
  • read("location file") - read output log

Secure your user input for process argument with this.

About

php background proccess


Languages

Language:PHP 100.0%