DreamHack Posted November 23, 2008 Share Posted November 23, 2008 I want to create a download page for files in a folder in the web directory. So for example if the folder is named Files, and there are some files in it, i need a php script that will search in that folder for any existing files, and if they exist, then it will generate a table for each item so users can download it. I know this is possible as i have seen something similar with an image gallery that searches a folder and outputs thumbnails, but i need it for files. The directory is http://arpwn.com/etmain/ and the .pk3 files are maps for a game. And also the php would update the downloads page every time a new file is uploaded, or at least checked a couple times a week. I can do the styles myself, i just dont know how to check and get the files from the folder using php. Quote Link to comment https://forums.phpfreaks.com/topic/133918-need-help-using-php-to-check-if-file-exists-and-then-get-it/ Share on other sites More sharing options...
premiso Posted November 23, 2008 Share Posted November 23, 2008 I think you just want the file_exists function to check if it exists. To get it, depending on how you want it, file for an array or file_get_contents I would play around with that and check back if you have any problems. If you want this done for you, post in the freelance section. Quote Link to comment https://forums.phpfreaks.com/topic/133918-need-help-using-php-to-check-if-file-exists-and-then-get-it/#findComment-697094 Share on other sites More sharing options...
DreamHack Posted November 23, 2008 Author Share Posted November 23, 2008 k, ill post in the freelance section. ive been searching on google for examples on how to do this, but nothing works Quote Link to comment https://forums.phpfreaks.com/topic/133918-need-help-using-php-to-check-if-file-exists-and-then-get-it/#findComment-697102 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.