I want my wordpress website to work like mediafire. I already have an upload page that works only for logged in users. The uploaded files are saved in: uploads/username. However I want the downloads page to be unique for every user. I need a way for the page to show only the files that are in his upload directory to be shown to him (only the files in uploads/username). Any way to do that?
2
Answers
I found a wordpress question (Getting the names of all files in a directory with PHP) from where I got most of the code and then i added the user name function.
You can add the following code in your function.php file.
Visit this link for more details.