duncan121 Posted December 17, 2006 Share Posted December 17, 2006 Hi experts.I have a directory with files waiting to be installed.Once they have been installed they are registered in a MySQL database.I want the files which have been installed to be invisible in a list.I have managed to write the code to look at the directory and remove a single file. However I can get it to do the operation for all the installed files. Please see my code...Thanks for your help.Duncan $get_modules2 = new DB(); $get_modules2->query("SELECT * FROM ".DB_PREFIX."_modules"); while ($display_modules2 = $get_modules2->next_record()) { $mods = $display_modules2['name']; } $this_dir = dir('modules/'); while ($file = $this_dir->read()) { if($file != '.' && $file != '..' && $file != 'home' && $file != 'admin' && $file != 'system' && $file != $mods) { echo $file; } } Link to comment https://forums.phpfreaks.com/topic/30998-dir-mysql-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.