How to view files content from a different directory - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: How to view files content from a different directory (/showthread.php?tid=81430) |
How to view files content from a different directory - tonyharden - 03-01-2022 Hi all, I'm trying to create links to the files located in different folder with the below link structure(just for reference): https://mywebsite/index.php/report/generateList However, when I click on the link links generated, it shows an error 404 Page Not Found. The folder in question, is in a completely different location(not within Codeigniter directory). So I was wondering if anyone can shed some light on how I can create the link to view the content of the files when click on it? Here is my code: PHP Code: <?php Thank you in advance! RE: How to view files content from a different directory - InsiteFX - 03-02-2022 Can you show us your directory structure? app system public -- assets -- index.php etc; You can try this: PHP Code: $directory = "/apps/text_files/"; |