Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Location
    Bristol, England
    Posts
    830
    Tokens
    0

    Default Small PHP Code Needed

    I am looking for a small bit of php code which counts the number of jpg, png, gif and bmp files in a directory and outputs the answer in 1 number.

    +rep for anyone who can help.

  2. #2
    Join Date
    Feb 2009
    Posts
    166
    Tokens
    0

    Default

    Quote Originally Posted by jack-bristol View Post
    I am looking for a small bit of php code which counts the number of jpg, png, gif and bmp files in a directory and outputs the answer in 1 number.

    +rep for anyone who can help.
    PHP Code:
    <?php
    $directory 
    "gallery/images/";
    $filecount count(glob("" $directory "*.*"));
    echo 
    "Images in Gallery: $filecount";
    ?>
    That will say how many files are in a folder...

    Gl
    The sky is the limit, but you can touch the moon if you try.

    Zimbu Gaming || The way games should be played!

  3. #3
    Join Date
    Feb 2009
    Location
    Bristol, England
    Posts
    830
    Tokens
    0

    Default

    Thanks +rep

Posting Permissions

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