[英]How to Copy the File from one Folder to another
Hi i am using libmail to send mails. 嗨,我正在使用libmail发送邮件。 In File Attachment Php File Upload is not working Because libmail attachment function only focus the local path .
在“文件附件Php”中,“文件上载”不起作用,因为libmail附件功能仅关注本地路径。 So It is possible to copy a file from one folder to another.
因此可以将文件从一个文件夹复制到另一个文件夹。 Is It Possible Please Guide me.
有可能请指导我。 Thanks in advance
提前致谢
Use the copy()
in php. 在php中使用
copy()
。
copy('path/to/original/text.txt', 'path/to/destination/text.txt');
http://php.net/manual/en/function.copy.php http://php.net/manual/zh/function.copy.php
rename()
is for actually renaming a file. rename()
用于实际重命名文件。
rename('path/to/file/file.ext', 'path2/to2/file2/file.ext');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.