You are here: Re: list files from directory on a site « HTML « IT news, forums, messages
Re: list files from directory on a site

Posted by Jim Moe on 05/05/06 03:39

chlori wrote:
>> If you can run PHP files on your server you could use something like
>> this:
>>
>> <?php
>> $dir=""; // Directory where files are stored
>> if ($dir_list = opendir($dir)) {
>> while(($filename = readdir($dir_list)) !== false) {
>>
That should be "readdir($dir_list)) != false".

>> ?>
>> <p><a href="<?php echo $filename; ?>"><?php echo $filename;
>> ?></a></p>
>> <?php
>> }
>> closedir($dir_list);
>> }
>> ?>
>
> I get an "Internal Server Error". Any ideas?
>
What is in your error_log for the error?

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация