当前位置: 首页>>代码示例>>PHP>>正文


PHP pc_base::load_config方法代码示例

本文整理汇总了PHP中pc_base::load_config方法的典型用法代码示例。如果您正苦于以下问题:PHP pc_base::load_config方法的具体用法?PHP pc_base::load_config怎么用?PHP pc_base::load_config使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pc_base的用法示例。


在下文中一共展示了pc_base::load_config方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     parent::__construct();
     $this->table_name = $this->db_tablepre . 'index_mapping';
 }
开发者ID:lestatmq,项目名称:cms,代码行数:7,代码来源:index_mapping_model.class.php

示例2: __construct

 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'reviews';
     $this->table_name = $this->old_table_name = 'reviews_check';
     parent::__construct();
 }
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:7,代码来源:reviews_check_model.class.php

示例3: addart

function addart($catid, $title, $content)
{
    $info = array();
    $info['catid'] = 3;
    $info['title'] = "api push";
    $info['content'] = "absolutelu api push";
    $db_config = pc_base::load_config('database');
    pc_base::load_sys_class('mysql', '', 0);
    pc_base::load_sys_class('param', '', 0);
    $db = pc_base::load_model('content_model');
    $categorys = getcache('category_content_1', 'commons');
    $category = $categorys[3];
    //var_dump($categorys);
    $modelid = $category['modelid'];
    //var_dump($modelid);
    //die;
    $db->set_model($modelid);
    $setting = string2array($category['setting']);
    $workflowid = $setting['workflowid'];
    $info['status'] = 99;
    $info['keywords'] = "";
    $info['description'] = str_cut(str_replace(array("\r\n", "\t", '[page]', '[/page]', '“', '”', ' '), '', strip_tags($info['content'])), 200);
    $info['username'] = "sumuya";
    $info['inputtime'] = '';
    echo "1";
    if ($db->add_content($info)) {
        return true;
    }
    return false;
}
开发者ID:baowzh,项目名称:fulianweb,代码行数:30,代码来源:testpush.php

示例4: addart

function addart($catid, $title, $content)
{
    $info = array();
    $info['catid'] = $catid;
    $info['title'] = $title;
    $info['content'] = $content;
    $db_config = pc_base::load_config('database');
    pc_base::load_sys_class('mysql', '', 0);
    pc_base::load_sys_class('param', '', 0);
    $db = pc_base::load_model('content_model');
    $category = $categorys[3];
    $modelid = $category['modelid'];
    $db->set_model($modelid);
    $setting = string2array($category['setting']);
    $workflowid = $setting['workflowid'];
    $info['status'] = 99;
    $info['keywords'] = get_keywords($info['title'], 3);
    $info['description'] = str_cut(str_replace(array("\r\n", "\t", '[page]', '[/page]', '“', '”', ' '), '', strip_tags($info['content'])), 200);
    $info['username'] = "admin";
    $info['inputtime'] = '';
    if ($db->add_content($info)) {
        return true;
    }
    return false;
}
开发者ID:baowzh,项目名称:fulianweb,代码行数:25,代码来源:xpush.php

示例5: __construct

	function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'product_pic';
        $this->product_cat = pc_base::load_model('product_cat_model');
		parent::__construct();
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:product_pic_model.class.php

示例6: __construct

 function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'dianping_type';
     parent::__construct();
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:7,代码来源:dianping_type_model.class.php

示例7: __construct

 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'search';
     parent::__construct();
 }
开发者ID:shenhua4286,项目名称:gxw,代码行数:7,代码来源:search_model.class.php

示例8: sys_auth

function sys_auth($string, $operation = 'ENCODE', $key = '', $expiry = 0)
{
    $key_length = 4;
    $key = md5($key != '' ? $key : pc_base::load_config('system', 'auth_key'));
    $fixedkey = md5($key);
    $egiskeys = md5(substr($fixedkey, 16, 16));
    $runtokey = $key_length ? $operation == 'ENCODE' ? substr(md5(microtime(true)), -$key_length) : substr($string, 0, $key_length) : '';
    $keys = md5(substr($runtokey, 0, 16) . substr($fixedkey, 0, 16) . substr($runtokey, 16) . substr($fixedkey, 16));
    $string = $operation == 'ENCODE' ? sprintf('%010d', $expiry ? $expiry + time() : 0) . substr(md5($string . $egiskeys), 0, 16) . $string : base64_decode(substr($string, $key_length));
    $i = 0;
    $result = '';
    $string_length = strlen($string);
    for ($i = 0; $i < $string_length; $i++) {
        $result .= chr(ord($string[$i]) ^ ord($keys[$i % 32]));
    }
    if ($operation == 'ENCODE') {
        return $runtokey . str_replace('=', '', base64_encode($result));
    } else {
        if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $egiskeys), 0, 16)) {
            return substr($result, 26);
        } else {
            return '';
        }
    }
}
开发者ID:Hacker-One,项目名称:exp,代码行数:25,代码来源:php+authkey加密构成.php

示例9: create_table

 /**
  * 按月份创建表
  */
 private function create_table()
 {
     $data_info = pc_base::load_config('database', $this->db_setting);
     $charset = $data_info['charset'];
     $sql = "CREATE TABLE IF NOT EXISTS `" . $this->table_name . "` (\r\n  \t\t`id` int(10) unsigned NOT NULL auto_increment,\r\n  \t\t`pid` smallint(5) unsigned NOT NULL default '0',\r\n  \t\t`siteid` smallint(5) unsigned NOT NULL default '0',\r\n  \t\t`spaceid` smallint(5) unsigned NOT NULL default '0',\r\n  \t\t`username` char(20) NOT NULL,\r\n  \t\t`area` char(40) NOT NULL,\r\n  \t\t`ip` char(15) NOT NULL,\r\n  \t\t`referer` char(120) NOT NULL,\r\n  \t\t`clicktime` int(10) unsigned NOT NULL default '0',\r\n  \t\t`type` tinyint(1) unsigned NOT NULL default '1',\r\n  \t\tPRIMARY KEY  (`id`),\r\n  \t\tKEY `pid` (`pid`,`type`,`ip`)\r\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=" . $charset . " ;";
     $this->db->query($sql);
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:10,代码来源:poster_stat_model.class.php

示例10: __construct

	function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		//$this->db_tablepre = $this->db_config[$this->db_setting]['tablepre'];
		$this->table_name = 'vote_option';
		parent::__construct();
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:vote_option_model.class.php

示例11: __construct

 public function __construct()
 {
     $this->urlrules = getcache('urlrules', 'commons');
     self::set_siteid();
     $this->categorys = getcache('category_content_' . $this->siteid, 'commons');
     $this->html_root = pc_base::load_config('system', 'html_root');
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:7,代码来源:url.class.php

示例12: __construct

 /**
  * 构造函数
  * 
  */
 public function __construct()
 {
     $this->db = pc_base::load_model('session_model');
     $this->lifetime = pc_base::load_config('system', 'session_ttl');
     session_set_save_handler(array(&$this, 'open'), array(&$this, 'close'), array(&$this, 'read'), array(&$this, 'write'), array(&$this, 'destroy'), array(&$this, 'gc'));
     session_start();
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:11,代码来源:session_mysql.class.php

示例13: __construct

	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'model';
		parent::__construct();
		$this->charset = $this->db_config[$this->db_setting]['charset'];
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:sitemodel_model.class.php

示例14: __construct

 function __construct()
 {
     $path = pc_base::load_config('system', 'session_n') > 0 ? pc_base::load_config('system', 'session_n') . ';' . pc_base::load_config('system', 'session_savepath') : pc_base::load_config('system', 'session_savepath');
     ini_set('session.save_handler', 'files');
     session_save_path($path);
     session_start();
 }
开发者ID:ahmatjan,项目名称:huluphp,代码行数:7,代码来源:session_files.class.php

示例15: connect_memcache

 public function connect_memcache()
 {
     //连接memcache
     $options = array('host' => pc_base::load_config('system', 'memcache_host'), 'port' => pc_base::load_config('system', 'memcache_port'), 'timeout' => pc_base::load_config('system', 'memcache_timeout'), 'persistent' => pc_base::load_config('system', 'memcache_persistent'));
     $this->memcache = new Memcache();
     $func = $options['persistent'] ? 'pconnect' : 'connect';
     $options['timeout'] === false ? $this->memcache->{$func}($options['host'], $options['port']) : $this->memcache->{$func}($options['host'], $options['port'], $options['timeout']);
 }
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:8,代码来源:cache_my.class.php


注:本文中的pc_base::load_config方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。