Jump to content

List files in folder.


Recommended Posts

So here is my code:

<?$path=dirname($_SERVER['REQUEST_URI']);$dir_handle = @opendir($path) or die("Unable to open $path");while ($file = readdir($dir_handle)) {if($read!='.' && $read!='..' && $read!='pass.php' && $read!='pageinfo.php' && $read!='edit.php' && $read!='change.php' $read!='title.html' && $read!='filesearch.php')echo "<a href=\"$file\">$file</a><br>";}?>

The error I'm getting is Parse error: syntax error, unexpected T_VARIABLE in /aqua_news/filesearch.php on line 5

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...