forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Eazy-D 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!!
-
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);
}
}