jlp09550 Posted October 27, 2007 Share Posted October 27, 2007 What is the best/simpliest way to move a file from one directory on the server to another? Quote Link to comment https://forums.phpfreaks.com/topic/75030-best-way-to-move-files-on-a-server/ Share on other sites More sharing options...
Toshiba23 Posted October 27, 2007 Share Posted October 27, 2007 you can use move_uploaded_file() or it's alias, copy() Quote Link to comment https://forums.phpfreaks.com/topic/75030-best-way-to-move-files-on-a-server/#findComment-379399 Share on other sites More sharing options...
jlp09550 Posted October 27, 2007 Author Share Posted October 27, 2007 you can use move_uploaded_file() or it's alias, copy() Doesn't move_uploaded_file() only apply to uploaded files rather than those already uploaded? Quote Link to comment https://forums.phpfreaks.com/topic/75030-best-way-to-move-files-on-a-server/#findComment-379403 Share on other sites More sharing options...
derwert Posted October 27, 2007 Share Posted October 27, 2007 Use copy() then after verifying the copy was successful use unlink() on the original file. Quote Link to comment https://forums.phpfreaks.com/topic/75030-best-way-to-move-files-on-a-server/#findComment-379426 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.