首页  >  文章  >  后端开发  >  SourceTree Export 出错

SourceTree Export 出错

WBOY
WBOY原创
2016-06-20 12:29:551306浏览

http://my.oschina.net/zgldh/blog/185259

我按照这篇文档制作导出功能,出现以下错误


export.bat

@set export_php="D:\My\Libraray3\tool\export.php"@set export_dir="D:\My\Libraray3\export"@set source_files=%*@rmdir %export_dir% /s/q@mkdir %export_dir%@php %export_php% %source_files%@explorer %export_dir%


export.php
<?php    date_default_timezone_set('Asia/Shanghai');    if($argc == 0)    {        exit('Nothing to copy');    }         define('DS', DIRECTORY_SEPARATOR); // I always use this short form in my code.    $source_dir = 'D:'.DS.'My'.DS.'Libraray3';    $exp_dir = 'D:'.DS.'My'.DS.'Libraray3'.DS.'export';    function ExportOneFile($path)    {        global $source_dir,$exp_dir;             $final_source = $source_dir.DS.$path;        $final_dest = $exp_dir.DS.$path;             $final_dest_dir = dirname($final_dest).DS;        if(!is_dir($final_dest_dir))        {            mkdir($final_dest_dir,0777,true);        }        return copy($final_source,$final_dest);    }         foreach($argv as $index=>$path)    {        if($index === 0)        {            continue;        }        if(ExportOneFile($path))        {            echo $index.' : '.$path." exported\n";        }    }        echo "All Complete. Please go to $exp_dir to view files";



回复讨论(解决方案)

你先吧浏览器切换到 gbk 编码,看看是否有正常输出

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn