惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
T
Tenable Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
W
WeLiveSecurity
D
DataBreaches.Net
Attack and Defense Labs
Attack and Defense Labs
H
Heimdal Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
AI
AI
P
Proofpoint News Feed
PCI Perspectives
PCI Perspectives
Schneier on Security
Schneier on Security
T
Threatpost
GbyAI
GbyAI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Help Net Security
F
Full Disclosure
T
Threat Research - Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
M
MIT News - Artificial intelligence
L
Lohrmann on Cybersecurity
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
Y
Y Combinator Blog
腾讯CDC
The Hacker News
The Hacker News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园_首页
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 最新话题
Security Latest
Security Latest
Know Your Adversary
Know Your Adversary
Forbes - Security
Forbes - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
SegmentFault 最新的问题
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
L
LangChain Blog
Vercel News
Vercel News
Cisco Talos Blog
Cisco Talos Blog
量子位
P
Proofpoint News Feed
H
Hacker News: Front Page
Help Net Security
Help Net Security
L
LINUX DO - 热门话题
Project Zero
Project Zero
C
Cisco Blogs

博客园 - chenping2008

连接远程数据库,得到数据插入本地表中 PHP删除目录 php统计目录大小 js秒数转换天时分秒 JS切换图片 js 游览器log的记录 2个iframe中checkbox联动 JS Clone函数 JS普通递归的改进 JS随机数的产生方法 JS相等运算符(==)和等同运算符(===) silverlight树形结构区服选择 Mongodb的一些基本概念 Mongodb在Ubuntu下的安装 redis windows下使用及redis命令 相册功能 Node.js 系列翻译---console Node.js 系列翻译---概要 补充Silverlight中图片显示
php复制目录
chenping2008 · 2013-06-23 · via 博客园 - chenping2008
function copyDir($dirSrc,$dirTo)
{
    if(is_file($dirTo))
    {
        echo '目标不是目录不能创建!';
        return;
    }
    if(!file_exists($dirTo))
    {
        mkdir($dirTo);
    }
    $dir_handle = @opendir($dirSrc);
    if($dir_handle)
    {
        while($filename = readdir($dir_handle))
        {
            if($filename!="." && $filename!="..")
            {
                $subSrcFile = $dirSrc . "\\".$filename;
                 $subToFile = $dirTo . "\\".$filename;
                 
                 if(is_dir($subSrcFile))
                 {
                     copyDir($subSrcFile, $subToFile);
                 }
                 if(is_file($subSrcFile))
                 {
                      copy($subSrcFile, $subToFile);
                 }
            }
        }
        closedir($dir_handle);
    }
}

posted @ 2013-06-23 10:42  chenping2008  阅读(816)  评论(0)    收藏  举报