php - Windows 系统上的 PHP pcntl_exec 知道脚本的 PID
问题描述
我有这个代码:
if(!function_exists('pcntl_exec')){
function pcntl_exec($path, $args=array()){
if(is_string($args)){
$args = array($args);
}
if(count($args)){
$path = '"'.$path.'"';
}
$shell = new COM('WScript.Shell');
$shell->run($path . (count($args)? ' ' . implode(' ',$args) : ''), 0, true);
}
}
有没有办法知道 $shell->run 指令返回的 PID?Tks
解决方案
推荐阅读
- spring - 无法从 Spring Boot 连接到 rabbitmq STOMP
- c# - 从在线服务器获取数据时如何使用进度条
- javascript - 如何设置到 .scrollIntoView 行为的定时过渡:平滑?
- sql - Oracle: MAX of SUM of each Group
- javascript - Jquery 子菜单手风琴在单击时关闭并打开
- android - 在控制台页面上单击“启用 Crashlytics”时“完成该操作时出错”
- api - Flutter response.body 为空
- python - Python Flask 没有从 SQLAlchemy 数据库中删除具有给定帖子标题的正确帖子
- php - 在 Prestashop 模块中注册钩子
- python - 不和谐中特定角色的用户列表(Python)