Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Listing all files in a directory

    Hey,

    I am using php 4.x.x - how can i list all the files in a directory. I know in PHP 5 you can use scandir() but what about php 4?

    Thanks in advance,

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    check readdir in the manual

    4.3.0 + could use glob

    chdir('/home/site/www/dir');
    $files = glob('*.*');
    Íkii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cheersd Okii


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •