Page 1 of 1

Hide Directory ( solved )

Posted: Thu Mar 11, 2004 6:29 pm
by wesnoel
OK I am listing a directory and displaying as an html template. I would like to hide one of the directoies. I think eregi would work but I do not know how to impliment it.

Here is my directory list script...

Code: Select all

<?php 
if ($handle = opendir('.')) { 
   while (false !== ($file = readdir($handle))) { 
	if($file == '.' || $file == '..')
	
	{
	    continue;
	}
	
	if(is_dir($file))
	
	{



//display template


$name = strtoupper($file);
$thumb = strtolower($file);

include "template.php";

echo "<br>";
	   
	 

	 
  } 
    
   }  
   closedir($handle); 
   
   
} 



?>

Any help would be great!


Thank in advance,

Wes/

Posted: Thu Mar 11, 2004 6:31 pm
by bodge
y cant u just add the name of the dir to your if state?

Posted: Thu Mar 11, 2004 6:37 pm
by wesnoel
Ohhhhhhhh yeah!

You rock!


Thanks bodge!


Wes/