18 include_once (
"Lib.Common.php");
25 $path_env = getenv(
"PATH");
26 if ($path_env ==
false) {
29 foreach (explode(
":", $path_env) as
$path) {
30 if (file_exists(
"$path/$cmdname")) {
31 return "$path/$cmdname";
39 return php_uname(
'n');
44 if ($hostname ==
false) {
47 $ip = gethostbyname($hostname);
48 if ($ip == $hostname) {
56 return getenv(
"SERVER_NAME");
61 return getenv(
"SERVER_ADDR");
80 return pcntl_wexitstatus(
$status);
83 if ($opt && array_key_exists(
'envs', $opt) && is_array($opt[
'envs'])) {
86 if ($opt && array_key_exists(
'closestdin', $opt) && $opt[
'closestdin'] ===
true) {
89 if ($opt && array_key_exists(
'closestdout', $opt) && $opt[
'closestdout'] ===
true) {
92 if ($opt && array_key_exists(
'closestderr', $opt) && $opt[
'closestderr'] ===
true) {
102 if (is_link(
$path)) {
105 return realpath(
$path);
110 if (
$dir === null ||
$dir ===
false) {
122 error_log(implode(
",", $output));
static ssystem($args, $opt=null)
static getAbsolutePath($path)
if(substr($wsh, 0, 1)!= '/') $args
static reloadLocaleCache()
foreach($argv as $arg) $cmd
static getCommandPath($cmdname)
static getHostIPAddress($hostname="")
static tempnam($dir, $prefix)