CI_Config

class CI_Config

$config

Array of all loaded config values

$is_loaded

Array of all loaded config files

item($item[, $index=''])
Parameters:
  • $item (string) – Config item name
  • $index (string) – Index name
Returns:

Config item value or NULL if not found

Return type:

mixed

Fetch a config file item.

set_item($item, $value)
Parameters:
  • $item (string) – Config item name
  • $value (string) – Config item value
Return type:

void

Sets a config file item to the specified value.

slash_item($item)
Parameters:
  • $item (string) – config item name
Returns:

Config item value with a trailing forward slash or NULL if not found

Return type:

mixed

This method is identical to item(), except it appends a forward slash to the end of the item, if it exists.

load([$file = ''[, $use_sections = FALSE[, $fail_gracefully = FALSE]]])
Parameters:
  • $file (string) – Configuration file name
  • $use_sections (bool) – Whether config values shoud be loaded into their own section (index of the main config array)
  • $fail_gracefully (bool) – Whether to return FALSE or to display an error message
Returns:

TRUE on success, FALSE on failure

Return type:

bool

Loads a configuration file.

site_url()
Returns: Site URL
Return type: string

This method retrieves the URL to your site, along with the “index” value you’ve specified in the config file.

This method is normally accessed via the corresponding functions in the URL Helper.

base_url()
Returns: Base URL
Return type: string

This method retrieves the URL to your site, plus an optional path such as to a stylesheet or image.

This method is normally accessed via the corresponding functions in the URL Helper.

system_url()
Returns: URL pointing at your CI system/ directory
Return type: string

This method retrieves the URL to your CodeIgniter system/ directory.

Note

This method is DEPRECATED because it encourages usage of insecure coding practices. Your system/ directory shouldn’t be publicly accessible.

doc_CodeIgniter
2016-10-15 16:31:00
Comments
Leave a Comment

Please login to continue.