system( 'abc.exe -f abc.txt' );
exec( 'abc.exe -f abc.txt' );

解决方案 »

  1.   

    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]);返回值: 字符串
      

  2.   

    我运行的程序直接运行的效果是打开一个 dos窗口,但是我现在用php函数调用时,没有弹出dos窗口,而且php程序一直也没有执行完,请问是什么原因,如何让其弹出dos窗口。