Welcome Guest, Not a member yet? Register   Sign In
How to autoload shared package
#1

[eluser]noslen1[/eluser]
I'd like to use the Package feature for sharing libraries and helpers between applications.
My CodeIgniter structure looks like :
Code:
/back/ // admin app
    /config/
    /controllers/
    /helpers/
    ...
/front/ // main site app
    /config/
    /controllers/
    /helpers/
    ...
/shared/
    /helpers/
    /libraries/
    /models/
/system/
    /core/
    /database/
    ...
/www/
    /back/
        /css/
        ...
    /front/
        /css/
        ...
But when I move some code from /back/helpers and /back/libraries to /shared/helpers, and /shared/libraries, and load the "shared" package like this in /back/config/autoload.php:
Code:
$autoload['packages'] = array('/shared');
It just doesn't work.

I also tried others combinations, but nothing works
Code:
$autoload['packages'] = array('shared');
$autoload['packages'] = array('/shared/');
$autoload['packages'] = array('shared/');
$autoload['packages'] = array('./shared');
$autoload['packages'] = array('shared/helpers', 'shared/libraries');

What am I doing wrong or missing ?


Messages In This Thread
How to autoload shared package - by El Forum - 11-15-2012, 04:13 AM
How to autoload shared package - by El Forum - 11-15-2012, 10:15 AM
How to autoload shared package - by El Forum - 11-16-2012, 02:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB