Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 5:23 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: How to write a PHP coding to list out all files and director
PostPosted: Wed Feb 02, 2011 6:20 am 
Offline
Newbie
User avatar

Joined: Fri Jan 28, 2011 1:06 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time

How to write a PHP coding to list out all files and directories as links to them?

This is somewhat similar to some index pages. When new file or folder is added to the directory, HTML page should display the newly created file/folder together with previous ones after it is being refreshed. (prefer in alphabatical order)

How to achieve this sort of functionality in PHP? Please provide sample coding as well. (and any references)

Thanks.


Last edited by Andrrew on Sat Feb 05, 2011 10:40 am, edited 1 time in total.

TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to write a PHP coding to list out all files and director
PostPosted: Thu Feb 03, 2011 1:45 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
Code:
// open the current directory  
$dirconn=opendir(".");

while ((
$file readdir($dirconn))!==false) {
echo 
"$file <br>";
}

closedir($dirconn);
 

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to write a PHP coding to list out all files and director
PostPosted: Mon Jun 06, 2011 11:47 am 
Offline
Newbie
User avatar

Joined: Mon Jun 06, 2011 11:22 am
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
I am also eager to know about it. So any body here who knows about it.

_________________
Biztechconsultancy


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  

 Similar topics
 Uplading Files Dynamically Using SSIS
 How to write a JSP Program to manipulate Last Date visited
 reset the list counter
 data leakage detection coding in java
 nested ordered list
 Remove ordered list numbers
 Add border around ordered list elements
 creating non ordered list using UL tag.
 ordered list with roman numbers
 ordered list from specific number

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team