6月 25, 2024 - 分类 Linux, 开发笔记   评论 php exec获取的输出不完整已关闭评论

php exec获取的输出不完整

Exec 获取到的输出不完整:

$process = exec('ps -ef |grep vt4e-ywew-cdd1-taqm-69v1| grep -v grep', $output, $rtn);

php exec获取的输出不完整

可以增加 -ww参数:增加输出宽度

$process = exec('ps -efww |grep vt4e-ywew-cdd1-taqm-69v1| grep -v grep', $output, $rtn);

正常

评论被关闭。