'; $folder_file ='flat_file_data.txt'; // name of flat file to read $fp = fopen($folder_file,'r'); // open flat file for reading if (!$fp) {print 'ERROR: Unable to open file'; echo '
';echo $folder_file;echo '
';exit;}// error if no handle found for flat file $line= fread($fp,1024); // increase this length if required $f_array=explode("\n",$line); $folder_key=0; // while ($f_array[$folder_key]) { ; $fileCount = 0; $p_folder=strip_tags(nl2br($f_array[$folder_key])); // for security // print to begin un-ordered list using folder name as heading and as div id print '
'; print ''; print '
'; $folder_key++; } //-- end while loop --> //fclose($fp); // close flat file print '
'; ?>