當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonAction::__construct方法代碼示例

本文整理匯總了PHP中CommonAction::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonAction::__construct方法的具體用法?PHP CommonAction::__construct怎麽用?PHP CommonAction::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonAction的用法示例。


在下文中一共展示了CommonAction::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     if (empty($_SESSION['info']['a_name'])) {
         $this->redirect('Login/index');
     }
 }
開發者ID:snowtl,項目名稱:tanglang,代碼行數:7,代碼來源:CenterAction.class.php

示例2: D

 function __construct()
 {
     parent::__construct();
     $this->db = D("Model");
     $this->field_db = D("ModelField");
     $this->type_db = D("ModelType");
 }
開發者ID:lxp521125,項目名稱:TP-Admin,代碼行數:7,代碼來源:ModelAction.class.php

示例3: __construct

 /**
  * 構造函數,父類
  * @Title: __construct
  * @Description: todo(基礎構造函數)
  *
  * @author quqiang
  *         @date 2015年5月12日 下午4:37:55
  * @throws
  *
  */
 public function __construct()
 {
     parent::__construct();
     // 加載基礎配置信息
     $dir = CONF_PATH;
     $configDir = $dir . 'desing.php';
     if (!file_exists($configDir)) {
         $msg = '文件 ' . $configDir . ' 不存在!';
         throw new NullDataExcetion($msg);
     }
     require $configDir;
     $this->default = $desing_default;
     $this->controls = $desing_controll;
     // 合並組件配置元素
     if ($this->controls && $this->default) {
         unset($temp);
         foreach ($this->controls as $k => $v) {
             $array = array_merge($this->default, $v['property']);
             sortArray($array, 'sort');
             $temp[$k] = $array;
         }
         $this->controlsConfig = $temp;
     }
     $this->assign('config', $this->controlsConfig);
     $this->assign('control', $this->controls);
     $this->assign('tagIndentity', $this->tagIndentity);
     $this->assign('propertyTagType', $this->propertyTagType);
 }
開發者ID:tmlsoft,項目名稱:main,代碼行數:38,代碼來源:DesingFormBaseAction.class.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->server = DBC("remote.service.uri") . "Update/";
     $this->local = ENTRY_PATH . "/Data/Updates/";
     $this->currentVersion = DBC("system.version");
 }
開發者ID:bqx619,項目名稱:ones_dev,代碼行數:7,代碼來源:SystemUpdateAction.class.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->db = Db::getInstance();
     $this->max_size = 800000;
     //每卷800左右
 }
開發者ID:bharatthakkar,項目名稱:stock-crowd-funding-system,代碼行數:7,代碼來源:DatabaseAction.class.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     //        $this->pM = D('Product');
     //        $this->bM = D('Brand');
     //        $this->sM = D('Store');
 }
開發者ID:bennylii,項目名稱:waterfall,代碼行數:7,代碼來源:IndexAction.class.php

示例7: __construct

 public function __construct()
 {
     require APP_ROOT_PATH . "app/Lib/common.php";
     require APP_ROOT_PATH . "app/Lib/deal.php";
     parent::__construct();
     parent::assign('main_title', L(MODULE_NAME . "_" . ACTION_NAME));
 }
開發者ID:eliu03,項目名稱:fanweP2P,代碼行數:7,代碼來源:TransferAction.class.php

示例8: D

 function __construct()
 {
     parent::__construct();
     $this->db = D("Content");
     $this->model_db = D("Model");
     $this->category_db = D("Category");
     // $this->categorys = D('Category')->where("siteid = %d", $this->siteid)->select();
 }
開發者ID:lxp521125,項目名稱:TP-Admin,代碼行數:8,代碼來源:ContentAction.class.php

示例9: D

 function __construct()
 {
     parent::__construct();
     $this->db = D('Position');
     $this->data_db = D('PositionData');
     $this->model_db = D('Model');
     $this->type_db = D('ModelType');
 }
開發者ID:lxp521125,項目名稱:TP-Admin,代碼行數:8,代碼來源:PositionAction.class.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     //會員名
     $user_id = intval($_REQUEST['user_id']);
     $username = M("user")->where("id=" . $user_id)->getField("user_name");
     $this->assign("username", $username);
     $this->assign("user_id", $user_id);
 }
開發者ID:centaurustech,項目名稱:crowdfunding-9,代碼行數:9,代碼來源:UserBankAction.class.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $nav = array('index' => array('name' => '首頁'), 'deals' => array('name' => '項目列表', 'acts' => array('index' => '列表')), 'investor' => array('name' => '天使投資人', 'acts' => array('invester_list' => '列表')), 'deal' => array('name' => '項目詳情', 'acts' => array('show' => '詳情', 'update' => '動態', 'support' => '支持', 'comment' => '評論')), 'news' => array('name' => '動態', 'acts' => array('index' => '最新', 'fav' => '關注')), 'article_cate' => array('name' => '文章列表'), 'article' => array('name' => '文章內容', 'acts' => array('index' => '詳情')), 'faq' => array('name' => '新手幫助'));
     if (LICAI_TYPE) {
         $nav['licai'] = array('name' => '理財模塊', 'acts' => array('index' => '理財首頁', 'deals' => '理財列表頁', 'deal' => '理財詳情頁'));
     }
     $this->navs = $nav;
 }
開發者ID:BruceJi,項目名稱:fanwe,代碼行數:9,代碼來源:NavAction.class.php

示例12: M

 function __construct()
 {
     parent::__construct();
     $this->node = M('Node')->where("id = %d", $_GET['cid'])->find();
     if (isset($_GET['tablename'])) {
         $this->db = D(trim($_GET['tablename']));
     } else {
         $this->db = D($node['module']);
     }
 }
開發者ID:lxp521125,項目名稱:TP-Admin,代碼行數:10,代碼來源:EnumCommonAction.class.php

示例13: __construct

 public function __construct()
 {
     $this->provinceInfo = C('APPOINT_AD_PROVINCE');
     $provinceIds = array();
     foreach ($this->provinceInfo as $value) {
         $provinceIds[] = $value['id'];
     }
     $this->provinceIds = $provinceIds;
     //var_dump($_SESSION);
     parent::__construct();
 }
開發者ID:qiuai,項目名稱:tools,代碼行數:11,代碼來源:ProvinceAdvAction.class.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $admin = M('Admin')->where('id=' . $this->LOGIN_KEY)->find();
     $admin_name = $admin['name'] ? $admin['name'] : $admin['username'];
     $this->assign('admin_name', $admin_name);
     if ($admin['role_id']) {
         $adminrole = M('Admin_role')->where('id=' . $admin['role_id'])->find();
         $admin_role = $adminrole['name'];
     } else {
         $admin_role = '測試管理員->係統開發';
     }
     $this->assign('admin_role', $admin_role);
     //dump($admin);
 }
開發者ID:xuyi5918,項目名稱:ThinkPHPDistribution,代碼行數:15,代碼來源:IndexAction.class.php

示例15: Snoopy

 function __construct()
 {
     parent::__construct();
     //偽裝
     $this->snoopy = new Snoopy();
     $this->snoopy->agent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11";
     //偽裝瀏覽器
     $this->snoopy->rawheaders["Pragma"] = "no-cache";
     //cache 的http頭信息
     //$this->snoopy->rawheaders["X_FORWARDED_FOR"] = "222.28.40.101"; //偽裝ip
     $this->snoopy->rawheaders["X-Requested-With"] = "XMLHttpRequest";
     //偽裝AJAX
     $this->snoopy->rawheaders["Accept"] = "*/*; q=0.01";
     //偽裝AJAX
     //$this->snoopy->rawheaders["Cookie"] = "JSESSIONID=C30C576FF8B75E962644997ECFC25D12;"; //偽裝AJAX
     //$this->snoopy->rawheaders["Referer"] = "http://www.simsimi.com/talk.htm?lc=ch";
 }
開發者ID:ArronYR,項目名稱:collect,代碼行數:17,代碼來源:IndexAction.class.php


注:本文中的CommonAction::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。