Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jul 2003
    Location
    Orlando, Fl
    Posts
    2
    Member #
    2360
    contence of a folder to an array

    Hey all.. I am trying to get php to make an array of all the contence of a directory. Oonce I get that I can load it into flash... and use it for a slide show on my dad's web site.. if anyone could help that would be cool...

  2.  

  3. #2
    Junior Member vornn's Avatar
    Join Date
    Jul 2003
    Posts
    15
    Member #
    2150
    Hi Doc, welcome to the board.

    I have a book with exactly that script in it, However the book is at home, so I'll post the script tomorrow.


  4. #3
    Junior Member
    Join Date
    Jul 2003
    Location
    Orlando, Fl
    Posts
    2
    Member #
    2360
    Hey vornn thanks man. that would be a huge help I been looking all over on ways to do it but every time I try it I get some crazy error and I want to pull my hair out... thanks for the help :-)

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    I believe:
    PHP Code:
    $handle opendir("./");
    $result readdir($handle);
    $results = array();

    while (
    $result !== false)
    {
        if (
    is_dir($result))
        {
            
    array_push($resultsresult);
        }
        
    $result readdir($handle);
    }
    closedir($handle);

    print_r($results); 
    It's contents, BTW.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Changed it.
    JR


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:48 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com