Submit Tips/Quickies

Application Architecture : Miscellaneous

check dir then include the file

Submitted By: ayen
Date: 02/14/02 17:53

here some code that im using when there is to many include file...normaly i put this thing on index.php

 $dirlist = opendir("dirname");
            while($file=readdir($dirlist)) {
                  if(!ereg('^\.|html|LOG|test',$file))
                  {

                $mods = substr($file,0,strlen($file));

                  include($mods);
                  //echo $mods;
                  }
            }
closedir();
}
if(!ereg('^\.|html|LOG|test',$file)) this section handle the file that you dont want to include on it


Comments:
How about this instead?Figment08/12/02 17:20
RE: check dir then include the fileayen04/15/02 21:54
RE: check dir then include the filephil 04/10/02 10:03
RE: check dir then include the fileayen03/20/02 10:33
check dir then include the fileToni Rose MIra03/18/02 23:50
Code For downloadToni Rose MIra03/18/02 23:47
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.