Total members 11890 |It is currently Thu Apr 25, 2024 12:44 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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.

Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

Code:
// open the current directory  
$dirconn=opendir(".");

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

closedir($dirconn);
 


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 2 posts ] 

  Related Posts  to : How to write a PHP coding to list out all files and director
 Write Vector list to File     -  
 Read list of files in java I/O code     -  
 servlet coding     -  
 I am new in PHP, want coding or PHP file     -  
 Java Coding     -  
 Standard Huffman Coding     -  
 Coding serialization concepts in C++     -  
 Arithmatic Coding Com-Decompression algorithm     -  
 source code of huffman coding ?     -  
 coding a simple packet sniffer     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com