How to list all directories and the contents inside that directories i

hi all, please anybody give an idea to list all the directories in a s

Page 1 of 1

4 Replies - 1997 Views - Last Post: 25 September 2008 - 06:36 AM Rate Topic: -----

#1 margret   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 24-September 08

How to list all directories and the contents inside that directories i

Post icon  Posted 24 September 2008 - 03:10 AM

hi all, please anybody give an idea to list all the directories in a sytem by using php code.
Is This A Good Question/Topic? 0
  • +

Replies To: How to list all directories and the contents inside that directories i

#2 no2pencil   User is online

  • Professor Snuggly Pants
  • member icon

Reputation: 6644
  • View blog
  • Posts: 30,937
  • Joined: 10-May 07

Re: How to list all directories and the contents inside that directories i

Posted 24 September 2008 - 03:12 AM

Google Search Results
Php.net
Was This Post Helpful? 0
  • +
  • -

#3 Moonbat   User is offline

  • D.I.C Regular
  • member icon

Reputation: 36
  • View blog
  • Posts: 424
  • Joined: 30-June 08

Re: How to list all directories and the contents inside that directories i

Posted 24 September 2008 - 11:34 AM

Just use scandir() with the root directory as the parameter.
Was This Post Helpful? 0
  • +
  • -

#4 margret   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 24-September 08

Re: How to list all directories and the contents inside that directories i

Posted 25 September 2008 - 02:01 AM

View PostMoonbat, on 24 Sep, 2008 - 11:34 AM, said:

Just use scandir() with the root directory as the parameter.



sorry friend,,actually my requirement is to show all of the drives(c,d,e etc..)and the folders inside that , and the contents in eah folder to show like a tree..And i want to drag a picture fromone of those folders and drag it to another side(say bottom) and save to table.... how is this possible by using php code....

View Postno2pencil, on 24 Sep, 2008 - 03:12 AM, said:




sorry friend,,actually my requirement is to show all of the drives(c,d,e etc..)and the folders inside that , and the contents in eah folder to show like a tree..And i want to drag a picture fromone of those folders and drag it to another side(say bottom) and save to table.... how is this possible by using php code....
Was This Post Helpful? 0
  • +
  • -

#5 akozlik   User is offline

  • D.I.C Addict
  • member icon

Reputation: 91
  • View blog
  • Posts: 798
  • Joined: 25-February 08

Re: How to list all directories and the contents inside that directories i

Posted 25 September 2008 - 06:36 AM

You can't read the client machine's directory structure using PHP. You'd need to use a different language. I don't think Javascript can do it either. PHP is only a server side scripting language and is only run on the server. By the time it reaches the client machine it's already been parsed and executed.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1