Hello
I'm using this code for directory listing in a college project
I'm getting errors while using filemtime() or filectime() functions,how to correct the errors?
I'm using this code for directory listing in a college project
PHP Code:
<?php
$mode = $_GET['mode'];
$dir = $user."/".$mode;
if($handle = @opendir($dir))
{
while($file = readdir($handle))
{
if(is_file($dir.'/'.$file))
//$time = filemtime($file);
echo "<tr><td width='80%'><div class='sub_alt'><img src='bg/Message.png'/> <a href='read.php?mode=".$mode."&user=".$user."&token=".$pass."&message=".$file."'><b>".ucfirst(basename($file,'.html'))."</b></a></div></td><td><a href='del.php?mode=".$mode."&user=".$user."&token=".$pass."&message=".$file."'><div class='footer'><font color='red'><b>(x)</b></font></a></td></tr>";
}
closedir($handle);
}
?>
Comment