Home  >  Article  >  Backend Development  >  The copy command cannot copy the file name of .htaccess class?

The copy command cannot copy the file name of .htaccess class?

WBOY
WBOYOriginal
2016-08-23 09:17:491445browse

copy命令无法复制 .htaccess 此类的文件名? 而从一个 copy("a.htaccess",".htaccess")文件则可以,有没有解决的方法的?

回复内容:

copy命令无法复制 .htaccess 此类的文件名? 而从一个 copy("a.htaccess",".htaccess")文件则可以,有没有解决的方法的?

不知题主是怎么复制的, 下面这是没问题得

<code class="php">$file = 'F:\\Zend\\git\\test\\.htaccess';

$dest = 'F:\\Zend\\git\\.htaccess';

if (copy($file, $dest)) {
    echo "success\r\n";
    
} else {

    echo "Error\r\n";
}
</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn