<? 
set_time_limit(0); 
exec ("详细命令",$arr,$sta); 
var_dump($arr);
?>
 If the output argument is present, then the specified array will be filled with every line of output from the command. Trailing whitespace, such as \n, is not included in this array. Note that if the array already contains some elements, exec() will append to the end of the array. If you do not want the function to append elements, call unset() on the array before passing it to exec(). 像你说的类似于ajax的功能exec是没有的