Welcome Guest, Not a member yet? Register   Sign In
Problem with Custom config file
#5

[eluser]tomcode[/eluser]
Quote:... why does database.php, routes.php,smileys.php etc.. get away with this and I can’t?

The above mentioned use their own routine to load the file, the moment You load using this->load->config() You need to have a $config variable declared, here the example for the smileys :
Code:
/**
* Get Smiley Array
*
* Fetches the config/smiley.php file
*
* @access    private
* @return    mixed
*/
if ( ! function_exists('_get_smiley_array'))
{
    function _get_smiley_array()
    {
        if ( ! file_exists(APPPATH.'config/smileys'.EXT))
        {
            return FALSE;
        }

        include(APPPATH.'config/smileys'.EXT);

        if ( ! isset($smileys) OR ! is_array($smileys))
        {
            return FALSE;
        }

        return $smileys;
    }
}


Messages In This Thread
Problem with Custom config file - by El Forum - 01-13-2011, 08:42 AM
Problem with Custom config file - by El Forum - 01-13-2011, 09:26 AM
Problem with Custom config file - by El Forum - 01-13-2011, 09:37 AM
Problem with Custom config file - by El Forum - 01-13-2011, 10:55 AM
Problem with Custom config file - by El Forum - 01-13-2011, 04:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB