need help.. urgent:(
Posted: Sat Dec 26, 2009 1:40 pm
Hi again guyzz.. i wrote this script to open dir on my windows directory but it is not working.. as i am using windows so i can use both forward slash or backward slash but not working.. giving errors.. can some one tell me where is the problem?
Code: Select all
<?
$dir_name = "D:\xampp\htdocs\Opendir";
$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);
echo "$dir_name";
echo "$file_list";
?>