Welcome Guest, Not a member yet? Register   Sign In
Problems loading a style css from another directory
#1

Hello!
Today I load a css dynamically as follows:

PHP Code:
   function addStyle($file '')
 
   {
 
       $ci = &get_instance();
 
       $header_css $ci->config->item('header_css');

 
       if (empty($file) || !$file) {
 
           return;
 
       }

 
       if (is_array($file)) {
 
           foreach ($file as $item) {
 
               $header_css[] = $item;
 
           }

 
           $ci->config->set_item('header_css'$header_css);
 
       } else {
 
           $header_css[] = $file;
 
           $ci->config->set_item('header_css'$header_css);
 
       }
 
   

This works fine, but when I try to load into another directory, the function can not find the style, causing error.
Does anyone know of any way to dynamically load the css being able to be in another directory as well?

Thank you!

Reply


Messages In This Thread
Problems loading a style css from another directory - by Skinper - 04-02-2019, 04:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB