Welcome Guest, Not a member yet? Register   Sign In
Read/Load all php files with a certain ending?
#19

[eluser]Nummero2[/eluser]
Ok I did put this in the autoload.php config file:
Quote:$files = glob(APPPATH.'helpers/*_me_helper.php');
foreach($files as $key=>$file)
{
$files[$key] = str_replace('_helper.php','',substr(strrchr($file,'/'),1));
}

$autoload['helper'] = array_merge($files,array('url','news'));

Then I created a new php file in the location I want it to be named me_helper.php. There I put the following in it:

Quote:class Me extends Controller
{

function Me()
{
parent::Controller();

$files = glob(APPPATH.'helpers/*_me_helper.php');
foreach($files as $key=>$file)
{
$files[$key] = str_replace('_helper.php','',substr(strrchr($file,'/'),1));
}

$this->load->helpers($files);


}


}

But now when i type:

var_dump('$files');

in the me_helper.php file under $this->load->helpers($files); I get nothing still i´m not given all my helpers from the folder xampp\htdocs\data\use\helpers
I only see a blank screen

I now I´m a noob but can someone help me? Please :-(


Messages In This Thread
Read/Load all php files with a certain ending? - by El Forum - 08-07-2008, 07:32 AM
Read/Load all php files with a certain ending? - by El Forum - 08-07-2008, 10:41 AM
Read/Load all php files with a certain ending? - by El Forum - 08-07-2008, 03:04 PM
Read/Load all php files with a certain ending? - by El Forum - 08-07-2008, 03:31 PM
Read/Load all php files with a certain ending? - by El Forum - 08-07-2008, 11:54 PM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 12:33 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 12:51 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 01:22 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 01:25 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 01:53 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 02:09 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 02:56 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 04:05 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 04:20 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 04:34 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 04:44 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 06:29 AM
Read/Load all php files with a certain ending? - by El Forum - 08-08-2008, 06:41 AM
Read/Load all php files with a certain ending? - by El Forum - 08-10-2008, 10:06 AM
Read/Load all php files with a certain ending? - by El Forum - 08-10-2008, 11:02 AM
Read/Load all php files with a certain ending? - by El Forum - 08-10-2008, 01:27 PM
Read/Load all php files with a certain ending? - by El Forum - 08-10-2008, 02:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB