![]() |
[Resolved] FTP - Recursive List Files and Folder - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: [Resolved] FTP - Recursive List Files and Folder (/showthread.php?tid=40480) |
[Resolved] FTP - Recursive List Files and Folder - El Forum - 04-10-2011 [eluser]BrianLabs[/eluser] Hello, I got a small problem while trying to list files and folders from my FTP recursive. The listing works but i don't get the right structure for the array. Code: public function list_files_rec($strPath = '/', $intLevel = 0) { The Result looks like this http://pastebin.com/iBC7cjRH Sometimes he put the things in the right way (e.g. /fb/classes/db/Crystal) together and sometimes not (e.g. /fb/classes/db/Crystal/Helper/) What i want is a nested array of the file and folder structure that is exactly like on the server and files shouldn't be an array. I mean Code: [/fb/contact.php] => Array Should be Code: [0] => /fb/contact.php Edit Solved the problem a little bit. Code: /** http://php.net/manual/en/function.ftp-nlist.php (first comment) Now the result looks like this http://pastebin.com/My6sAAuT But how can i get an array structure like i want it. Code: Array I have no idea... |