$docFile="C:\wamp\www\docDemo\docs\\a.doc";  //需要转换的文档
     $newFile="C:\wamp\www\docDemo\swfs\\a.swf";  //转换后的文件名

        $command = "\"C:\\wamp\www\docDemo/tools\FlashPrinter.exe\" {$docFile} -o {$newFile}";
        exec($command,$out,$status);
        echo $status;exit;最后的结果是返回3, 而且会执行很久(我那个doc只有很短一段),执行的时候进程里出现了FlashPrinter.exe
反正结果是失败的, 我把$command打印出来 copy- paste 到 cmd.ext 控制台下执行 没问题, 我检查了很久没发现哪写错了

解决方案 »

  1.   

    $command = "C:/wamp/www/docDemo/tools/FlashPrinter.exe {$docFile} -o {$newFile}"; 需确认路径无误,并有一般用户完全访问权限
      

  2.   

    路径完美无误 后来我echo $command 出来并且 复制到村cmd 里面直接运行都可以
      

  3.   

    看看你执行php的进程的用户的权限
      

  4.   

    $command   =   "\ "C:\\wamp\www\docDemo/tools\FlashPrinter.exe\ "斜杠后面的空格是个神马东西