예제 #1
0
 public static function watermark($ext, $frp)
 {
     if (self::$watermark) {
         $allow_ext = array('jpg', 'jpeg', 'png');
         self::$watermark_config['allow_ext'] && ($allow_ext = explode(',', self::$watermark_config['allow_ext']));
         if (in_array($ext, $allow_ext)) {
             iPHP::LoadClass('Pic');
             iPic::init(self::$watermark_config);
             iPic::watermark($frp);
         }
     }
 }
예제 #2
0
파일: iPHP.php 프로젝트: sunhk25/iCMS
header('Content-Type: text/html; charset=' . iPHP_CHARSET);
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
if (function_exists('memory_get_usage') && (int) @ini_get('memory_limit') < abs(intval(iPHP_MEMORY_LIMIT))) {
    @ini_set('memory_limit', iPHP_MEMORY_LIMIT);
}
@ini_set('date.timezone', iPHP_TIME_ZONE);
//设置时区
function_exists('date_default_timezone_set') && date_default_timezone_set(iPHP_TIME_ZONE);
require iPHP_PATH . '/iPHP.compat.php';
require iPHP_PATH . '/iPHP.class.php';
set_error_handler('iPHP_ERROR_HANDLER');
iPHP::timer_start();
//waf
iPHP::LoadClass("Waf");
waf::filter();
//security
iPHP::LoadClass("Security", 'S');
iS::filter();
iS::GP('page', 'GP', 2);
define('__SELF__', $_SERVER['PHP_SELF']);
define('__REF__', $_SERVER['HTTP_REFERER']);
$iDB_CLASS = 'Mysql';
iPHP_DB_TYPE == 'mysql' && version_compare(PHP_VERSION, '5.5', '>=') && ($iDB_CLASS = 'Mysqli');
iPHP_DB_TYPE == 'pgsql' && ($iDB_CLASS = 'Pgsql');
iPHP_DB_TYPE == 'sqlite' && ($iDB_CLASS = 'SQLite');
iPHP::loadClass($iDB_CLASS, 'DB');
//加载数据库操作类
iPHP::loadClass("FileSystem", 'FS');
//加载文件操作类
iPHP::loadClass('Cache');
//加载缓存操作类
예제 #3
0
 public static function yun_write($frp)
 {
     if (self::$config['yun']['enable']) {
         iPHP::LoadClass('Yun');
         iYun::init(self::$config['yun']);
         iYun::write($frp);
     }
 }