Welcome Guest, Not a member yet? Register   Sign In
how to access config items
#1

(This post was last modified: 05-30-2015, 05:36 PM by cupboy.)

I tried this. It fails.

Trying to access items I have added to
application/config/config.php within a cronjob
Maybe this is just something that can't be done?

<?php
// include './lib/inc_dbconnect.php';
// Database Connections

// the below fails:

//$db_host     = $this->config->item('db_host');
//$db_database = $this->config->item('db_database');
//$db_username = $this->config->item('db_username');
//$db_password = $this->config->item('db_password');    

// the below fails also:

$db_host     = config_item('db_host');
$db_database = config_item('db_database');
$db_username = config_item('db_username');
$db_password = config_item('db_password');    
?>
Reply


Messages In This Thread
how to access config items - by cupboy - 05-30-2015, 05:17 PM
RE: how to access config items - by gadelat - 05-31-2015, 01:27 AM
RE: how to access config items - by CroNiX - 05-31-2015, 11:22 AM
RE: how to access config items - by includebeer - 05-31-2015, 03:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB