【发布时间】:2016-04-15 19:45:35
【问题描述】:
我正在尝试访问使用命令 man (debian) 的手册。
使用此代码:
$out = shell_exec("man");
echo $out;
输出是:
What manual page do you want?
如何从 php 代码中选择页面?
【问题讨论】:
我正在尝试访问使用命令 man (debian) 的手册。
使用此代码:
$out = shell_exec("man");
echo $out;
输出是:
What manual page do you want?
如何从 php 代码中选择页面?
【问题讨论】:
man 本身不会做任何事情。您必须告诉它您要查看手册的命令。例如:man cd 将显示cd 命令的手册页。
例如试试:echo "<pre>" . shell_exec("man cd");
【讨论】: