Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Creating a list en print it on screen  (Read 2066 times)

0 Members and 1 Guest are viewing this topic.

Eazy-D

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Creating a list en print it on screen
« on: January 25, 2005, 07:09:03 pm »

Hi,

I've added a new link in the topmenu ("Music").  When you click on music, their must appear a list of Mp3 files wich are in a directory on my webspace. Just like you click on "FAQ", their appears a list with faq, but when I click on my "Music" link, a list of mp3 files must apear.  It would be very easy in use when the list of mp3 is build up of all the mp3 files of the directory i keep them in....

When you click on the button "music", the file "music.php" already loads....in "music.php" the list must be created and printed to the screen.

I still haven't found a solution the build such a list.... and to print that list on screen..

Any brain can help me?  

Thanx in Advanced!!
Logged

Nibbler

  • Guest
Re: Creating a list en print it on screen
« Reply #1 on: January 25, 2005, 07:42:50 pm »

I don't see what this has to do with coppermine.

Code: [Select]
<?
$dir = '/path/to/your/music/';

if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
            if (substr($file, strlen($file)-4) == '.mp3') echo "$file<br />";
        }
        closedir($dh);
    }
}
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 22 queries.