} if (!function_exists('file_get_contents')) { /** * Reads entire file into a string. * This function is not 100% compatible with the native function. * * @see http://php.net/file_get_contents * @since PHP 4.3.0 * * @param string $filename Name of the file to read. * @return string The read data or false on failure. */ function file_get_contents($filename) { $fhandle = fopen($filename, "r"); $fcontents = fread($fhandle, filesize($filename)); fclose($fhandle); return $fcontents; } } if (!empty($core_errorMessage)) { Core_ExitWithMessage($core_errorMessage, false, true); } /** * We now include the upgradephp package to define some functions used in Core * that may not be defined in the current PHP version. * * @see libs/upgradephp/upgrade.php * @link http://upgradephp.berlios.de/ */ //require_once INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
public function init() { if (!is_readable($this->pathIniFileDefaultConfig)) { Core_ExitWithMessage('General_ExceptionConfigurationFileNotFound: ' . $this->pathIniFileDefaultConfig); } $this->defaultConfig = new Core_Config_Ini($this->pathIniFileDefaultConfig, null, true); if (is_null($this->defaultConfig) || count($this->defaultConfig->toArray()) == 0) { Core_ExitWithMessage('General_ExceptionUnreadableFileDisabledMethod' . $this->pathIniFileDefaultConfig); } if (!is_readable($this->pathIniFileUserConfig)) { throw new Exception('General_ExceptionConfigurationFileNotFound' . $this->pathIniFileUserConfig); } $this->userConfig = new Core_Config_Ini($this->pathIniFileUserConfig, null, true); if (is_null($this->userConfig) || count($this->userConfig->toArray()) == 0) { Core_ExitWithMessage('General_ExceptionUnreadableFileDisabledMethod' . $this->pathIniFileUserConfig); } }