Re: Help, please!

From: Date: Sun, 24 Mar 2002 15:07:02 +0000
Subject: Re: Help, please!
References: 1  Groups: php.doc.chm 
Request: Send a blank email to php-doc-chm+get-87@lists.php.net to get a copy of this message
Hello Holger, Sunday, March 24, 2002, 4:34:25 PM, you wrote: HE> Hi guys! HE> This is Holger speaking, I'm the one who designs the "hi" and "low" HE> templates for the CHM manual. I have a very simple problem but my PHP skills HE> are rather limited at the moment. HE> Sorry to bug you all with this stupid little no-brainer, but I am in quite a HE> hurry with this and thought maybe you could help me out? Many thanks in HE> advance! HE> Let's say I have a folder on my webserver with several files. Some of these HE> files have the extension ".mp3". I also have a PHP script in this folder. I HE> want the script to return a list of all MP3-files from the folder, nothing HE> more. No strings attached and no special security thingamajing required. HE> I promise to work on the templates again when I got this little project HE> finished. :-) HE> Regards, Holger. Write something like this: $dir = opendir("."); //current folder while (($fname = readdir($dir)) !== FALSE) //"!== FALSE" is important! if (substr($fname, -4) == ".mp3") //if last 4 characters are ".mp3" echo $fname."<br>"; closedir($dir); -- Best regards, Olexandr mailto:supaboy@i.com.ua

« previous php.doc.chm (#87) next »