久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      PHP執(zhí)行Linux命令的兩個有用的函數(shù)exec和shell_exec

      php中的exec和shell_exec兩個函數(shù)都可以用來執(zhí)行l(wèi)inux命令,但它們在使用方式以及結(jié)果的返回上,差別還是比較大的。

      exec

      調(diào)用方式:

      exec($cmd.' 2>&1',$output,$status);

      $cmd:shell腳本

      2>&1:表示shell腳本執(zhí)行過程中的錯誤信息會被輸出

      $output:數(shù)組格式,用于存儲2>&1輸出的錯誤信息

      $status:shell腳本的執(zhí)行狀態(tài),0表示成功,其他都表示失敗

      shell_exec

      調(diào)用方式:

      $result = shell_exec($cmd);

      $cmd:shell腳本

      $result:shell腳本的執(zhí)行結(jié)果

      使用建議

      如果你的shell腳本返回的結(jié)果是一個列表,建議使用shell_exec,相應(yīng)的,如果它返回的只是某種狀態(tài),建議用exec。

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號