Dear friends ,
I am using window os . i face a problem is that
[PHP]
$file="D:\Domai ns\\naturetrail sindia.info\www root\html\\";
$file=$path."\h tml\\";
$d = dir($file);
while (false !== ($entry = $d->read())) {
$typ = filetype($entry );
if($typ == "dir"){
print '<li>[d]:'.$entry.'</li>';
}else if($typ == "file"){
$topic=explode( ".",$entry) ;
// $tname=$topic." .html";
if($topic[0] <> "") {
print '<li><input type="checkbox" name="check[]" value="'.$topic[0].'"><a href="edit.php? f='.$topic[0].'">'.$topic[0].'</a></li>';
}
}else{
print '<li>Unknown document type</li>';
}
}
$d->close();
?>
[/PHP]
problem is above code is its not check wethere $typ is file or directory
plz tell me how i can do that ?
and whats error in above code
sanjay
I am using window os . i face a problem is that
[PHP]
$file="D:\Domai ns\\naturetrail sindia.info\www root\html\\";
$file=$path."\h tml\\";
$d = dir($file);
while (false !== ($entry = $d->read())) {
$typ = filetype($entry );
if($typ == "dir"){
print '<li>[d]:'.$entry.'</li>';
}else if($typ == "file"){
$topic=explode( ".",$entry) ;
// $tname=$topic." .html";
if($topic[0] <> "") {
print '<li><input type="checkbox" name="check[]" value="'.$topic[0].'"><a href="edit.php? f='.$topic[0].'">'.$topic[0].'</a></li>';
}
}else{
print '<li>Unknown document type</li>';
}
}
$d->close();
?>
[/PHP]
problem is above code is its not check wethere $typ is file or directory
plz tell me how i can do that ?
and whats error in above code
sanjay
Comment