
03.02.2008, 15:20
|
|
Новичок
Регистрация: 11.04.2006
Сообщений: 26
С нами:
10569767
Репутация:
4
|
|
Basurman, пока не жалуюсь. В мануал лень лезть, а какая разница? Вот взял из GFS shell:
function ex($comd){ //Выполнение команды
$res = '';
if (!empty($comd)){
if(function_exists('exec')){
exec($comd,$res);
$res=implode("\n",$res);
}elseif(function_exists('shell_exec')){
$res=shell_exec($comd);
}elseif(function_exists('system')){
ob_start();
system($comd);
$res=ob_get_contents();
ob_end_clean();
}elseif(function_exists('passthru')){
ob_start();
passthru($comd);
$res=ob_get_contents();
ob_end_clean();
}elseif(is_resource($f=popen($comd,"r"))){
$res = "";
while(!feof($f)) { $res.=fread($f,1024); }
pclose($f);
}
}
return $res;
}
Здесь на самом низком уровне комманда passthru, после exec, shell_exec, system.
Последний раз редактировалось cow; 03.02.2008 в 15:28..
|
|
|