问题
Trying add default helper in Codeigniter, type in autoload $autoload['helper'] = array('url');
But i have an error Unable to load the requested file: helpers/_helper.php
on my system/helpers folder there is no such file like _helper.php
what i shoul do to load it?
回答1:
Check whether you have an empty array set to $autoload['helper']
variable in application/config/autoload.php.
$autoload['helper'] = array(''); // throw an error stated
Replace it with
$autoload['helper'] = array();
Even though I do not understand why it has to behave differently from the above two assignments, basically IMO it should behave the same.
回答2:
Make sure you write 'url'
Like this:
$autoload['helper'] = array('url');
回答3:
make sure the array is empty if your not going to pass in a url and if so this would ideal in passing in css stylesheet urls.
来源:https://stackoverflow.com/questions/9484480/couldnt-connect-to-helper-in-codeigniter