首页| 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
0.187578s