exec()不就行了?执行系统命令的函数
windows下用SYSTEM()

解决方案 »

  1.   

    linux下也可以用system函数。记得我曾经写过一个发传真的代码里面就用到了system函数。因为它有返回值。可以判断是否成功。
    <?php
    echo '<pre>';// Outputs all the result of shellcommand "ls", and returns
    // the last output line into $last_line. Stores the return value
    // of the shell command in $retval.
    $last_line = system('ls', $retval);
    $retval就是返回的值
    // Printing additional info
    echo '
    </pre>
    <hr />Last line of the output: ' . $last_line . '
    <hr />Return value: ' . $retval;
    ?>
      

  2.   

    exec
    如果不能用
    看该函数是否被禁用为了安全起见
    请禁用