<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [返回目錄](index.html)#### [高級應用與部署](gaoji_index.html "test") —— [數據庫分離部署](gaoji_mysql_fenli.html "test") V9數據模型功能,允許用戶把不同的數據表,分離到不同的數據庫服務器上。以實現負載的分離,更加的符合大訪問網站的需求。 ![](https://img.kancloud.cn/37/4f/374f7562519630b33e2e9ce711ad4883_631x359.png)##### 數據分離方法 ###### 1.數據庫連接配置 ``` <pre class="brush:xml">配置文件路徑:caches\configs\database.php ``` ``` <pre class="brush:xml"> return array ( 'default' => array ( 'hostname' => 'localhost', 'database' => 'phpcmsv9', 'username' => 'admin', 'password' => 'admin', 'tablepre' => 'v9_', 'charset' => 'gbk', 'type' => 'mysql', 'debug' => true, 'pconnect' => 0, 'autoconnect' => 0 ), /*可以根據自己需求設置多個數據庫鏈接配置*/ 'link1' => array ( 'hostname' => 'localhost', 'database' => 'comment', 'username' => 'admin', 'password' => 'admin', 'tablepre' => 'v9_', 'charset' => 'gbk', 'type' => 'mysql', 'debug' => true, 'pconnect' => 0, 'autoconnect' => 0 ), 'link2' => array ( 'hostname' => 'localhost', 'database' => 'workflow', 'username' => 'admin', 'password' => 'admin', 'tablepre' => 'v9_', 'charset' => 'gbk', 'type' => 'mysql', 'debug' => true, 'pconnect' => 0, 'autoconnect' => 0 ), ); ``` ###### 2.數據模型配置 ``` <pre class="brush:xml">配置文件路徑:phpcms\model中所有文件 ``` 該目錄下所有\*\_model.class.php都是數據模型文件 例如:workflow\_model.class.php ``` <pre class="brush:xml"> defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class workflow_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'link2'; //可以通過修改db_setting設置該數據表所鏈接的數據庫服務器 $this->table_name = 'workflow'; parent::__construct(); } } ``` [返回目錄](index.html) 上海盛大網絡發展有限公司 c 2006 - 2011 B2-20040053. 問題和建議請反饋至:http://bbs.phpcms.cn
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看