{ $content = php_strip_whitespace($phpFile); $content = preg_replace('/[\\s]*\\?\\>$/', '', trim($content)); $delStart && ($content = preg_replace('/^\\<\\?php[\\s]*/', '', $content)); return $content; } } $content = ''; $content .= compress_php(SMARTY_DIR . 'Functions.php'); $content .= compress_php(SMARTY_SYSPLUGINS_DIR . 'smarty_internal_data.php'); $content .= compress_php(SMARTY_SYSPLUGINS_DIR . 'smarty_internal_templatebase.php'); $content .= compress_php(SMARTY_SYSPLUGINS_DIR . 'smarty_internal_template.php'); $content .= compress_php(SMARTY_SYSPLUGINS_DIR . 'smarty_resource.php'); $content .= compress_php(SMARTY_SYSPLUGINS_DIR . 'smarty_internal_resource_file.php'); $content .= compress_php(SMARTY_SYSPLUGINS_DIR . 'smarty_cacheresource.php'); $content .= compress_php(SMARTY_SYSPLUGINS_DIR . 'smarty_internal_cacheresource_file.php'); file_put_contents(SMARTY_DIR . '~Runtime.php', '<?php ' . $content); } include_once SMARTY_DIR . '~Runtime.php'; //[SWH|+]================================================/ //include_once SMARTY_DIR.'Functions.php';//[SWH|+] /** * Load always needed external class files * include_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_data.php'; include_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_templatebase.php'; include_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_template.php'; include_once SMARTY_SYSPLUGINS_DIR . 'smarty_resource.php'; include_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_resource_file.php'; include_once SMARTY_SYSPLUGINS_DIR . 'smarty_cacheresource.php'; include_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_cacheresource_file.php';
define('FRAMEWORK_CORE_PATH', defined('__DIR__') ? __DIR__ : dirname(__FILE__)); define('FRAMEWORK_CORE_RUNTIME', FRAMEWORK_CORE_PATH . '/~Runtime.php'); isset($system) or die('$system is undefined.'); function compress_php($phpFile, $delStart = true) { $content = php_strip_whitespace($phpFile); $content = preg_replace('/[\\s]*\\?\\>$/', '', trim($content)); $delStart && ($content = preg_replace('/^\\<\\?php[\\s]*/', '', $content)); return $content; } if (!$system['debug'] && file_exists(FRAMEWORK_CORE_RUNTIME)) { include FRAMEWORK_CORE_RUNTIME; } else { $coreFiles = array('Helper', 'Loader', 'Input', 'Controller', 'Model', 'Router', 'Rule', 'DB', 'Cache', 'Session', 'Widget', 'Locale', 'AutoExpires'); if ($system['debug']) { foreach ($coreFiles as $fileName) { include FRAMEWORK_CORE_PATH . '/' . $fileName . '.php'; } file_exists(FRAMEWORK_CORE_RUNTIME) && unlink(FRAMEWORK_CORE_RUNTIME); } else { $content = ''; foreach ($coreFiles as $fileName) { $content .= compress_php(FRAMEWORK_CORE_PATH . '/' . $fileName . '.php'); } file_put_contents(FRAMEWORK_CORE_RUNTIME, '<?php ' . $content) or die(FRAMEWORK_CORE_RUNTIME . ' is not writeable.'); include FRAMEWORK_CORE_RUNTIME; } } class CI_DB_Cache extends phpFastCache { }