![]() |
Copy/Backup Folder
Is there a way I can copy a certain folder and its contents to a users computer using php?
|
|
I'm not sure if we're talking about the same thing here.
When a user registers on my website it automatically creates a folder for them. Every time they upload a file it gets put into their folder. I want the user to be able to click a button in their cp and download a backup of all their files. Is this possible? |
Tree is right. You could use the ZIP archive module for doing that. The Linux method looks far easier to me, as given as an example on the PHP.net page:
php Code:
|
I wouldnt create folders for everyone, that way everybody can find files of another user. I would save files by a file_id and link the user with a file by a database. That way you won't have to worry about all the file handling, just uploading and deleting files. "Eitje" as we would say here in the netherlands :>
|
Quote:
|
Thanks for that :) I was a bit confused when you mentioned FTP.
As for people being able to find the files of other users, it shouldn't be a problem because the files will only be images to display in a gallery anyway. |
No problem. I originally thought you wanted to build a script that backed things up to just your computer.
|
| All times are GMT. The time now is 08:51 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0