<?php
//定时备份我们的数据库文件
date_default_timezone_set("PRC");//时区设置
$backfilename = date("YmdHis".time());
$command = "C:\Users\ZhangShaoWen>D:\AppServ\MySQL\bin\mysqldump -u root -proot temp table > D:\\{backfilename}";
exec($command);
?>
bat文件
D:\AppServ\php5>php.exe php文件路径