What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Some PHP help, yet again

Some PHP help, yet again
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Some PHP help, yet again
PHP code:
<?php
foreach (glob("/path/to/maps/*.bsp") as $file) {
    $info = pathinfo($file);
    echo $info['filename']; // requires PHP 5.2.0 !!!
}
?>

If you're running on PHP < 5.2.0, you can get the file name using substr() and strrpos():
PHP code:
    $info = pathinfo($file);
    $basename = $info['basename'];
    echo substr($basename, 0, strrpos($basename, '.'));


This post was edited on 09-12-2009 at 04:03 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-12-2009 04:02 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Some PHP help, yet again - by Jimbo on 09-12-2009 at 01:28 PM
RE: Some PHP help, yet again - by Matti on 09-12-2009 at 04:02 PM
RE: Some PHP help, yet again - by Jimbo on 09-12-2009 at 07:44 PM
RE: Some PHP help, yet again - by absorbation on 09-13-2009 at 12:12 PM
RE: Some PHP help, yet again - by Jimbo on 09-14-2009 at 07:22 AM
RE: Some PHP help, yet again - by Baggins on 09-14-2009 at 11:29 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On