Jump to content

List files in folder.


Cod-nes

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

$read!='change.php' $read!='title.html'

You need some ampersands. :) (I only found that by putting each condition on its own line.)EDIT: There he goes again...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...