Forums
 This topic is locked 
             File Genie for PHP/MySQL
 Posted 26 May 2003  06:50:58 
  1 
     has   voted 
  26 May 2003  06:50:58 Kent Livingston posted: 
 Is there a corresponding PHP extension (or script) that will display files via a web page that are in a Linux or Windows directory and something better than a raw OS generated directory listing?  I found one PHP script but it seemed pretty convoluted.  TIA - GZ  Replies
 Replied 27 May 2003  13:31:56 
   27 May 2003  13:31:56 Patrick Woldberg replied: 
  File Genie for PHP is planned. We are hard working to create an PHP version of all add-ons that are also available for Pure ASP Upload.
A simple script would be:
<?php
if ($dir = @opendir("/tmp" ) {
) {
while (($file = readdir($dir)) !== false) {
echo "$file\n";
}
closedir($dir);
}
?>
It displays all files in the folder /tmp.
Offcourse this script can easily be customized. Check the PHP site for information about the functions that are used.
--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
  A simple script would be:
<?php
if ($dir = @opendir("/tmp"
 ) {
) {while (($file = readdir($dir)) !== false) {
echo "$file\n";
}
closedir($dir);
}
?>
It displays all files in the folder /tmp.
Offcourse this script can easily be customized. Check the PHP site for information about the functions that are used.
--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
 Replied 27 May 2003  17:41:40 
   27 May 2003  17:41:40 Kent Livingston replied: 
  Thanks that's helpful, now I just need to figure out the formatting for the listing - or what we call "legwork." 
Any time estimate on the File Genie for PHP? I'd be happy to buy another extensions once the problem I'm having with purePHP upload timing out from remote locations is addressed (see post in that forum)
  Any time estimate on the File Genie for PHP? I'd be happy to buy another extensions once the problem I'm having with purePHP upload timing out from remote locations is addressed (see post in that forum)
 Replied 27 May 2003  18:33:06 
   27 May 2003  18:33:06 Kent Livingston replied: 
  Here's some nice code that does exactly what I wanted:  www.1phpstreet.com/vb/scripts/ShowCode.asp?txtCodeId=594&lngWId=8 
  