CodeIgniter Forums
Best Method to Create CI Page Directory Viewer? - 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: Best Method to Create CI Page Directory Viewer? (/showthread.php?tid=69703)



Best Method to Create CI Page Directory Viewer? - cgtrman - 01-08-2018

I am using CI 3 and need to create a page that displays the contents (i.e., files and folders) of a directory on the file system. I am using Windows with IIS 7.5. I am relatively new to CI so keep that in mind. Any information will be greatly appreciated.


RE: Best Method to Create CI Page Directory Viewer? - InsiteFX - 01-08-2018

Create a controller and views for it, the controller will go in ./application/controllers
and the views will go in the ./application/views directories.


RE: Best Method to Create CI Page Directory Viewer? - cgtrman - 01-08-2018

(01-08-2018, 04:10 PM)InsiteFX Wrote: Create a controller and views for it, the controller will go in ./application/controllers
and the views will go in the ./application/views directories.

Thanks for the response. I know how to set up a new page using the MVC architecture, but I need a solution for creating a page that displays the folder on the file system for a user to view and download. Displaying the folder tree (js/jquery) and combining with CI php is what I need help with.


RE: Best Method to Create CI Page Directory Viewer? - InsiteFX - 01-08-2018

This is one of the nest jQuery Tree Plugins out there.

Has very good documentation etc;

jsTree


RE: Best Method to Create CI Page Directory Viewer? - XtreemDeveloper - 01-08-2018

You can make all View page in views Directory in given folder.
Also you can manage all pages as per controller name
Suppose you are using user controller than you can make user Directory in views folder and add all views in this Directory for user controller


RE: Best Method to Create CI Page Directory Viewer? - cgtrman - 01-12-2018

(01-08-2018, 08:15 PM)InsiteFX Wrote: This is one of the nest jQuery Tree Plugins out there.

Has very good documentation etc;

jsTree

Thanks!  I think this is the best solution.