Axcelcius Posted January 22, 2008 Share Posted January 22, 2008 Files in the system folder: - cache.sys.php - ajax.js - rss.php I only want it to include cache.sys.php $system_dir = opendir(ROOT_PATH."system/"); echo ROOT_PATH."system/"; while($system_file = readdir($system_dir)){ if(eregi("[a-zA-z0-9].sys.php$", $system_file)){ include_once "./system/".$system_file; } } Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted January 23, 2008 Share Posted January 23, 2008 No need for regex: <?php $files = glob(ROOT_PATH . 'system/*.sys.php'); foreach( $files as $file ) { include_once $file; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.