I try to use philsturgeon CI assets in my project and face this error :
PHP Fatal error: Call to undefined function css() in /var/www/html/staging/psms_dev/application/views/login.php on line 6
The code that i use is:
<?php echo css('style.css'); ?>
This is my folder structure:
application
system
assets
--css
--js
--images
and this is my assets.php config
$config['asset_dir'] = '/assets/';
$config['asset_url'] = config_item('base_url').'assets/';
I use CodeIgniter 2.0.2. Hope you guys can help. Thanks.
Is /assets/ supposed to be on your server’s root directory? If so, you need to chmod it as folders on the root are generally restricted. If not, then you might need to get rid of the first forward slash in
'/assets/'