Hi all,
I'm quite new with FuelPHP and I'm not a professionnal developper. Just doing that "for fun".
My upload function is wroking fine, but after that, when I can't get my upload Config with :
$link_to_path=Config::get('upload.path');
it's always equal null.
the same for :
Config::get('upload');
It works fine with the others config files (e.g. simpleauth, db...)
Any idea ? Did I miss something.
When you do issue that command?
If the config file hasn't been loaded, you would get NULL returned. The config file is loaded automatically when you use the Upload class.
If you want to access it before, load the config using Config::load('upload', true);
Thanx.
I thought i had try to load the confif file first.
It works now, not perfectly because it returns me :
C:\wamp\www\intranet\public\\assets\upload
I thought it would return only assets\upload
anyway, no big problem.
It returns whatever you have set in your app/config/upload.php config file, unless you've used a Config::set() somewhere. The Upload class itself doesn't modify config values.
Thx Harro.
It returned exactly what is in the config file. I forgot that the config file has this :
'path' => DOCROOT.DS.'assets'.DS.'upload',
So, everything is OK.