Jesterik Posted March 17, 2005 Report Share Posted March 17, 2005 Доброго времени суток. Возникла такая проблема.... Есть папка Models, в ней находятся папки 1, 2, 3, 4, (названия обсолютно разные могутбыть) Подскажите, как написать скрипт который будет сканить папку Models на наличие папок, брать имена папок и выводить их в броузере в виде ссылок... Зарание огромное пасибо Link to comment Share on other sites More sharing options...
Darhazer Posted March 17, 2005 Report Share Posted March 17, 2005 if ($handle = opendir(dirname( __FILE__ ))) { /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { if (is_dir($file))echo '<a href="'.$file.'">'.$file.'</a><br>'; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now