Hide Directory ( solved )

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wesnoel
Forum Commoner
Posts: 58
Joined: Fri Sep 05, 2003 11:53 am

Hide Directory ( solved )

Post 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/
Last edited by wesnoel on Thu Mar 11, 2004 6:37 pm, edited 1 time in total.
bodge
Forum Newbie
Posts: 7
Joined: Thu Mar 11, 2004 6:13 pm

Post by bodge »

y cant u just add the name of the dir to your if state?
wesnoel
Forum Commoner
Posts: 58
Joined: Fri Sep 05, 2003 11:53 am

Post by wesnoel »

Ohhhhhhhh yeah!

You rock!


Thanks bodge!


Wes/
Post Reply