Hi,
I had the same WARNING problem. I have listed my code below. Please check your path in the directory(for me it is $dir_name). You have to give the full path. Hope this helps.
<?php
$dir_name = "c:/program files/apache group/apache/htdocs/sts";
$dir = opendir($dir_name);
$file_list = "<ul>";
while ($file_name = readdir($dir))
{
if (($file_name != ".") && ($file_name != ".."))
{
$file_list .= "<li>$file_name";
}
}
$file_list .= "</ul>";
closedir($dir);
?>
<HEAD>
<TITLE>Directory Listing</TITLE>
</HEAD>
<BODY>
<P>Files in: <? echo "$dir_name"; ?></p>
<? echo "$file_list"; ?>
</BODY>