Creating a list en print it on screen Creating a list en print it on screen
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Creating a list en print it on screen

Started by Eazy-D, January 25, 2005, 07:09:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Eazy-D

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!!

Nibbler

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


<?
$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);
    }
}