Welcome Guest, Not a member yet? Register   Sign In
trying to use the config class
#1
Shocked 
(This post was last modified: 12-14-2020, 08:48 AM by richb201.)

The lines below are causing an error and i don;'t know why. I get " only variables should be assigned by reference" on line 300 of common.php. I have modified config.php by using 
$config['TYPO'] = 'PHARMA';

Do I need to modify the $config using item to create TYPO in the config class first, before I can use that index? 
I see $this->config->set_item('item_name', 'item_value'); in the docs, but i also see $config['base_url'] =  used in config.php. Should I be using set_item() and if so, where should I put this? 

<?php

  if ($this->config->item('TYPO')=='SOFTWARE'){
    echo '<script type="text/JavaScript"><img src="<?php echo base_url(); ?>assets/themes/default/images/new_blue_logo_sub240x240.png" style="float:left;margin-top:5px;z-index:5" alt="logo"/>
                </script>';
        }
    if ($this->config->item('TYPO')=='PHARMA'){
      echo '<script type="text/JavaScript"><img src="<?php echo base_url(); ?>assets/themes/default/images/output-onlinepngtools (8).png" style="float:left;margin-top:5px;z-index:5" alt="logo"/>
                </script>';
    }

?>
proof that an old dog can learn new tricks
Reply


Messages In This Thread
trying to use the config class - by richb201 - 12-14-2020, 08:45 AM
RE: trying to use the config class - by InsiteFX - 12-14-2020, 12:43 PM
RE: trying to use the config class - by richb201 - 12-14-2020, 01:56 PM
RE: trying to use the config class - by InsiteFX - 12-14-2020, 11:43 PM
RE: trying to use the config class - by richb201 - 12-22-2020, 11:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB