Get directory structure from FTP using PHP
问题 I have ftp server with a lot of subfolders and files in it. I need to retrieve the folder structure from ftp, which shows names of all folders and subfolders from a specified starting path. I'm not interested in files included in each folder, only the directory tree. I'm using PHP and my server does not support mlsd. Thanks for help. I implemented my own recursive function, which for some reason is not working. function ftp_list_files_recursive($ftp_stream, $path) { $lines = ftp_rawlist($ftp