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 1 of 1
  1. #1
    Regular Coder
    Join Date
    Jan 2009
    Posts
    208
    Thanks
    31
    Thanked 0 Times in 0 Posts

    Select image to include sub directories

    How do I make this include sub directories. ( Found Answer )

    PHP Code:
    ./** 

    PHP Code:
    <!--Start Background Configuration-->
    <?php
    // Configuration //
    $backgroundPath "H:/www/1TestingArea/View_Backgrounds/gallery-images/./**";
    $dailybackgroundPath "H:/www/1TestingArea/View_Backgrounds/background.jpg";
    // End Configuration //

    $aOptions glob(rtrim($backgroundPath'/\\') . '/*.jpg');



    if (!@
    copy($aOptions[array_rand($aOptions)], $dailybackgroundPath))
    {
        print 
    'Failed to copy background.';

        
    $error error_get_last();
    print 
    $error['message'];
    }
    ?>
    Last edited by Feckie; 06-08-2014 at 11:33 AM. Reason: found answer correction


 

Posting Permissions

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