PHP echo contents of folder help - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21) +---- Thread: PHP echo contents of folder help (/showthread.php?tid=26079) |
PHP echo contents of folder help - DAMINK™ - 04-25-2012 Ok i have a folder i use to upload images among other things. Now i want a script to allow me and a select few others to view the contents and click on the file name to load the image or whatever. I have that working largely however i cant seem to get it to link to the file. Now im not going to post the vb hooks as there is no need however the below is the code i am using to sort the folder and display its contents. Its doing that ok. Displaying based on time stamp however i cant get the linking to work properly. I get the link with an array at the end. Here is the code for anyone that can help. Also if you see other issues please let me know. Me and coding dont go well together. Im more of a porn man PHP Code: <?php Thanks if anyone can help. Fixed it. I was calling up the timestamp instead of the file for the link reference lol. Man im useless at this. RE: PHP echo contents of folder help - Deity - 05-29-2012 Glad you found your area of mistake. Next time I'd say go to HF, they have more people to help you trust me. I hate seeing threads blank when it's supposed to be SupportForums. RE: PHP echo contents of folder help - Prefinem - 06-01-2012 You are calling the file from the url. Unless your files are in your root web directory, it won't work. Make sure you append the document root to the url link. RE: PHP echo contents of folder help - DAMINK™ - 06-01-2012 This has been resolved a long time ago but thanks for the replies. |