#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Location
    Sweden
    Posts
    8
    Rep Power
    0

    Question FTP-functions, list directories


    Is it possible to get an array of the directories in the directory with the FTP-functions of PHP or in some other way?
    With ftp_nlist you can get an array with the files in the directory but shouldn't there be any way to do this to find out the directories instead?
  2. #2
  3. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    I guess you would have to try to change dir.. although it is not foolprove since dir can be blocked for users...
    And you know I mean that.
  4. #3
  5. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    You know, when I come to think about it, dont dirs have <DIR> in front of them? so all you have to do is to run eregi and echo whatever goes after <DIR>....
    And you know I mean that.

IMN logo majestic logo threadwatch logo seochat tools logo