Jump to content

PHP


Recommended Posts

Доброго времени суток.

Возникла такая проблема....

Есть папка Models, в ней находятся папки 1, 2, 3, 4, (названия обсолютно разные могутбыть)

Подскажите, как написать скрипт который будет сканить папку Models на наличие папок, брать имена папок и выводить их в броузере в виде ссылок...

Зарание огромное пасибо

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...