Heim > Fragen und Antworten > Hauptteil
php中exec函数执行bat脚本,为什么有时可以,有时失败??
bat脚本
@echo off
^
ffmpeg -f concat -i C:^AMP^apache2.4^htdocs^test^upload^2016-10-12^wu_1aurf2i6412121lrl4id1rqr1vgj0^filelist.txt -c copy C:^AMP^apache2.4^htdocs^test^upload^2016-10-12^57fdaea7c33d7.mpg
^
cd /
^
rd /S /Q C:^AMP^apache2.4^htdocs^test^upload^2016-10-12^wu_1aurf2i6412121lrl4id1rqr1vgj0
^
echo finished
^
php的执行代码:
<?php
$cmd ="C:AMPapache2.4htdocstestupload2016-10-12wu_1aurf2i6412121lrl4id1rqr1vgj0merg.bat";
//$cmd = "./../merg.bat";
$res = exec($cmd);
var_dump($res);