I would like to list all my folder on my web application without the files in it. At the moment I'm using this code but this will give me all files and folders:
//Connect
$conn = ftp_connect($ftp_server);
$login = ftp_login($conn, $ftp_username, $ftp_userpassword);
//
//Enable PASV ( Note: must be done after ftp_login() )
//
$mode = ftp_pasv($conn, TRUE);
$file_list = ftp_nlist($conn, "/webspace/httpdocs/brentstevens.nl/u_media/$uid/");
foreach ($file_list as $file)
{
// process folder
}
But this will output all files and folders. How can I adjust this code to only serve the folders?