Hi i am using libmail to send mails. In File Attachment Php File Upload is not working Because libmail attachment function only focus the local path . So It is possible to copy a file from one folder to another. Is It Possible Please Guide me. Thanks in advance
A:
rename('path/to/file/file.ext', 'path2/to2/file2/file.ext');
Alexander.Plutov
2010-10-15 13:32:40
actually this syntax move the file, use the copy() function instead (same parameters: http://php.net/manual/en/function.copy.php)
Cesar
2010-10-15 15:08:58
+1
A:
Use the copy()
in php.
copy('path/to/original/text.txt', 'path/to/destination/text.txt');
http://php.net/manual/en/function.copy.php
rename()
is for actually renaming a file.
etbal
2010-10-15 16:50:02