Posted by chlori on 05/05/06 12:25
Martin Jay wrote:
>> I get an "Internal Server Error". Any ideas?
>>
>> Is there some server config stopping it from working or am I doing
>> something wrong?
> Hmmm, I haven't seen that non-specific error since my Perl days. :)
The problem is solved:
When I changed the permissions for the script from 666 to 644 it works.
Don't know why, but it works...
My next questions:
- If I have files and directories it lists both the same way. I would
like to add a class="dir" to the directory links so I can change the
look with CSS.
- The List shows ".", ".." and ".htaccess". How can I hide these?
BTW, I'm using this script:
<?php
$dir="/home/xyxy/public_html/xyxyx/files";
if ($dir_list = opendir($dir))
{
while(($filename = readdir($dir_list)) !== false)
{
?>
<li><a href="files/<?php echo $filename; ?>"><?php echo $filename;
?></a></li>
<?php
}
closedir($dir_list);
}
?>
--
chlori
[Back to original message]
|