Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to copy a file ?

I want to copy a file to new directory with new name.

Like on first time signup, if user don't upload any image, then the file gets copy from app/public/images/default_pic.jpg to app/public/images/profiles/{username.md5(time())}.jpg.

http://php.net/manual/en/function.copy.php ?

Thanks, I should have remembered this. For future users: this function needs to have file already existed, else it gives an error. For more help checkout comments on the above links.