Go Back   DevHunters Webmaster Forum > Find a Webmaster / Web Developer / Job Requests > Web Project Requests: > PHP, ASP, JavaScript, Etc. / Programmers:

PHP, ASP, JavaScript, Etc. / Programmers: For people looking for a PHP programmer.

List Folder Contents

This is a discussion on List Folder Contents within the PHP, ASP, JavaScript, Etc. / Programmers: forums, part of the Web Project Requests: category; You know with PHP and MySQL, you can list a load of data. Well, is it possible to do it ...

Reply
 
LinkBack Thread Tools Display Modes
Old 03-25-2008, 07:12 PM   #1
New Hunter
 
Join Date: Dec 2007
Posts: 88
HB$ Balance: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
iTrader: (0)
Default List Folder Contents

You know with PHP and MySQL, you can list a load of data. Well, is it possible to do it with just PHP and a folder.
I need to list the items from a folder basicly, should I make a Database and store the data there?
Smiggy is offline   Reply With Quote
Old 04-03-2008, 07:45 PM   #2
Field Master
 
sunken's Avatar
 
Join Date: Sep 2007
Posts: 543
HB$ Balance: 0
sunken is on a distinguished road
iTrader: (0)
Default

There are commands to read a directory in PHP...

$dirname='/home/dir-to-read';

if ($handle = opendir($dirname)) {
while (false !== ($filename = readdir($handle))) {
echo($filename."\n");
}
closedir($handle);
}

Would load and print a list on the page. Of course you'd probably want to do some formatting rather than just an echo. You can put whatever code you want there.

Last edited by sunken; 04-03-2008 at 07:47 PM.
sunken is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios