system是执行C方面得到的.exe system() is just like the C version of the function in that it executes the given command and outputs the result exec是执行外部命令 string exec(string command, string [array], int [return_var]); 本函数执行输入 command 的外部程序或外部指令。它的返回字符串只是外部程序执行后返回的最后一行;若需要完整的返回字符串,可以使用 PassThru() 这个函数。要是参数 array 存在,command 会将 array 加到参数中执行,若不欲 array 被处理,可以在执行 exec() 之前呼叫 unset()。若是 return_var 跟 array 二个参数都存在,则执行 command 之后的状态会填入 return_var 中。 passthru 执行外部程序并不加处理输出资料。语法: string passthru(string command, int [return_var]);返回值: 字符串
system() is just like the C version of the function in that it executes the given command and outputs the result
exec是执行外部命令
string exec(string command, string [array], int [return_var]);
本函数执行输入 command 的外部程序或外部指令。它的返回字符串只是外部程序执行后返回的最后一行;若需要完整的返回字符串,可以使用 PassThru() 这个函数。要是参数 array 存在,command 会将 array 加到参数中执行,若不欲 array 被处理,可以在执行 exec() 之前呼叫 unset()。若是 return_var 跟 array 二个参数都存在,则执行 command 之后的状态会填入 return_var 中。
passthru
执行外部程序并不加处理输出资料。语法: string passthru(string command, int [return_var]);返回值: 字符串