首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > PHP > run and demonize the PHP scripts from WEB pages

run and demonize the PHP scripts from WEB pages

资 源 简 介

**php-forker** "php-forker" is a program written in C. I is used to start console PHP scripts in the background from a PHP script serving a web request. **Problem description.** The usage of the PCNTL (Process Control support) extension applicable for the task, is not recommended in WEB scripts, and a plain "system()" call from a PHP script creates a zombie shell process: system("/usr/local/bin/php script.php &"); As a solution, php\_forker demonizes a php-cli process that runs a console php script: system("/usr/local/bin/php-forker /path/to/script.php arg1"); ## Usage: ## ``` system("/usr/local/bin/php-forker /path/to/script.php one_arg "); ``` Where: * /usr/local/bin/php-forker - full path to binary php-forker * /path/to/script.php - full path to your php script * one\_arg is the optional parameter for PHP script argument. Using for hight-calculate or long-time process or conversing with AJAX: * WEB pages start baground process and in the parametr point tmp-filename.

文 件 列 表

example.php
main.c
Makefile
sleep.php
VIP VIP
  • 大智若愚 2小时前 成为了本站会员

  • Mason 4小时前 成为了本站会员

  • 5小时前 成为了本站会员

  • Half_Punch 1天前 成为了本站会员

  • liqing71718 1天前 成为了本站会员

  • 伟国 1天前 成为了本站会员

  • songy 1天前 成为了本站会员

  • 纯色幽默 1天前 成为了本站会员

  • odd? 1天前 成为了本站会员

  • 52JOY... 1天前 成为了本站会员

0.179605s