|
|
|
This script can be used when you have, for examples, a huge list of mp3's
which you want to list in a table without having to write them in. This script
can be used in linux and win32. It's a file explorer for the web.
<html>
<head>
<title>Web Development Luxembourg</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#006090" alink="#006090" vlink="#006699">
<font face="Arial" size="5" color="#006090"><center><b>Web Development Luxembourg -
phpDir v2.4</b></center><br></font>
<table align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="25" bgcolor="#006699"><img src="space.gif"></td>
<td width="400" height="25" bgcolor="#006699" valign="middle"><b><font face="Arial"
size="2" color="#ffffff"> File Name </font></b></td>
<td width="100" height="25" bgcolor="#006699" valign="middle"><b><font face="Arial"
size="2" color="#ffffff"> File Size </font></b></td>
<td height="25" bgcolor="#006699"><img src="space.gif"></td>
</tr>
<font face="Arial" size="1">
<?php
$temp = getenv( "QUERY_STRING");
$dir_name = "$temp";
if($dir_name == "") $dir_name = "d:/downloads";
$handle=opendir($dir_name);
while ($file = readdir($handle)) {
$filelst = "$filelst,$file";
}
closedir($handle);
$filelist = explode(",",$filelst);
sort($filelist);
for ($count=1;$count<count($filelist);$count++) {
print " <tr>\n";
$filename=$filelist[$count];
$file_path = "$dir_name/$filename";
$filesize = filesize($file_path);
if (is_file($file_path)) {
echo " <td height=\"25\" bgcolor=\"#006699\"><img src=\"space.gif\"></td>\n";
echo " <td width=\"400\" height=\"25\" valign=\"middle\"><font face=\"Arial\" size=\"2
\"> <a href=\"$dir_name/$filename\"><img src=\"f.gif\" width=\"20\" height=\"20\"
border=\"0\"></a> <a href=\"$dir_name/$filename\">$filename</font></a></td>\n";
echo " <td width=\"100\" height=\"25\" valign=\"middle\"><font face=\"Arial\" size=\"2
\"> $filesize bytes </font></td>\n";
echo " <td height=\"25\" bgcolor=\"#006699\"><img src=\"space.gif\"></td>\n";
}
elseif(($filename != ".") && ($filename != "..")) {
echo " <td height=\"25\" bgcolor=\"#006699\"><img src=\"space.gif\"></td>\n";
echo " <td width=\"400\" height=\"25\" valign=\"middle\"><font face=\"Arial\" size=\"2
\"> <a href=\"$dir_name/$filename\"><img src=\"o.gif\" width=\"20\" height=\"20\"
border=\"0\"></a> <a href=\"$dir_name/$filename\">$filename</font></a></td>\n";
echo " <td width=\"100\" height=\"25\" valign=\"middle\"><font face=\"Arial\" size=\"2
\"> <DIR> </font></td>\n";
echo " <td height=\"25\" bgcolor=\"#006699\"><img src=\"space.gif\"></td>\n";
}
print " </tr>\n\n";
}
?>
</font>
<tr>
<td colspan="4" bgcolor="#006699"></td>
</tr>
</table>
<p align=center>
<font face="Arial" size="1">
All Content is © 1999, <a href="http://www.webdev.lu/">Web Development
Luxembourg</a>.<br>
Created and Designed by <a href="mailto:laroche@webdev.lu">Laroche David</a>.
</font>
</p>
</body>
</html> |
|
| Display list of files within current and subdirectories (recursively) showing
each file as an anchored link and each directory as a category header. Categories : Filesystem, Directories, Arrays, PHP | | | php jump urls...the best way Categories : PHP, URLs, Filesystem | | | phpHoo2 (Xhoo using php3/MySQL) is a Yahoo-like link directory. Much like the Open Directory Project (dmoz.org). Categories : PHP, Complete Programs, Directories, MySQL, URLs | | | Extended Get File List Function Categories : PHP, Filesystem, Search, Directories | | | grab directory listings into an array the example prints out each
subdirectory in the main dir - further work is to be performed on this one Categories : Filesystem, PHP, Directories, Search, Utilities | | | A function which places the path and name of all subdirectories into an array Categories : PHP, Filesystem, Arrays, Directories | | | PHP4 DirectoryIterator Class Categories : PHP, PHP Classes, Filesystem, Directories | | | Directory Viewer, Directory Content Viewer, Directory Structure to HTML.
This code will basically create a complete set of HTMLs to let a user
navigate through any directory you want. Excellent code for large file
sharing pages. Categories : Directories, Filesystem, PHP | | | List the content of the directory of your webserver where this small PHP Script resides. Categories : PHP, Filesystem, Directories, CSS | | | getDirArray(Path,Filter,Sorted): Returns an array of the files in a directory,
filtered by regular expression and either sorted or randomized. Good for
random pictures and graphics. Categories : PHP, Filesystem, Directories | | | Directory viewer, customize how you display the file structure, easy to
understand. Found out about PHP 3 days ago, and this is my first prog. Categories : HTML and PHP, Complete Programs, Directories, Filesystem, PHP | | | Listing the 10 most recently updated files in a given dir by using last-
modified variable and printing to html with link to the file Categories : PHP, Directories, Filesystem | | | Open directory and File download Categories : PHP, Filesystem, Directories, HTML and PHP | | | Directory TreeView - File Manager & Explorer - FTP - Utility - PHP/HTML - Categories : PHP, Directories, FTP, Filesystem, HTML and PHP | | | file class , uploade file , download file already uploaded on another website Categories : PHP, PHP Classes, Filesystem, Web Services | |
| | | | Lubrobato Marco wrote :194
That a realy good script, because we can use it in linux
and also in win32. Because I have got a huge list of
documents which I don`t want to write in a mysql
database or html, because everyday there are
documents which have to delete or some othere are
new created. Thank you ...
| |
|
|
|