1.

Solve : Help with script?

Answer»

I found the following script on the internet, which shows all the files in a DIR. Great script, and it even doesn't show the file index.php. Now my question is, how do I make that it doesn't show other files neither. For example I protect the folder with a .htaccess file, and a .htpasswd file, and the file .ftpquota shouldn't be LISTED to. Anyone knows how to do this? It would be nice if I can enter which files shouldn't be listed in a list in the php file Do you understand any of that script, Blackberry?yes I do, I understand all the html and some of the php. But understanding and doing things by yourself is yet another THING, FIRST I tried the following thing:

*Copy the line if( $file != 'index.php' ) { till } again, and changed index.php to my files
  Didn't work, because then I saw index.php too
*Then I tried  if( $file != 'index.php,.htacess' ) but that didn't work to.
So I don't know a solution

[edit]Found my solution

$notshow = ARRAY('index.php', '.htaccess', '.htpasswd', '.ftpquota');
if(!in_array($file, $notshow)) {

[/edit]I knew you could do it.



Discussion

No Comment Found