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:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: Some PHP help, yet again
Thank you Matti :)

How could I then count the number of .bsp files and display that?

Also I am using the following code(very messy, I know) to get all images inside a directory and display them on after another with their names. How could I make them display in a 3 column table, each cell holding an image, and an image name?
php code:
Map images:<br><Br>
<?php
$folder = opendir("C:\Inetpub\wwwroot\lgsl\lgsl_files\maps\source\zombie_master");

$pic_types = array("jpg", "jpeg", "gif", "png");

$index = array();

while ($file = readdir ($folder)) {

  if(in_array(substr(strtolower($file), strrpos($file,".") + 1),$pic_types))
    {
        array_push($index,$file);
    }
}

closedir($folder);
?>
<?php
$path = "C:\Inetpub\wwwroot\lgsl\lgsl_files\maps\source\zombie_master";
$dir_handle = @opendir($path) or die("Unable to open folder");

while (false !== ($file = readdir($dir_handle))) {

if(ereg("(.*)\.(jpg|bmp|jpeg|png|gif)", $file)){
echo "$file<br><img src='http://sammyservers.com/lgsl/lgsl_files/maps/source/zombie_master//$file' alt='$file'><br />";
}


}
closedir($dir_handle);


?>

This post was edited on 09-12-2009 at 07:49 PM by Jimbo.
09-12-2009 07:44 PM
Profile E-Mail PM 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