<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>

                #### 寫入配置文件 前臺 ~~~ <input type="text" name="WEB_COM" value="{:config('web.WEB_COM')}" placeholder="后面不要加斜杠/" autocomplete="off" class="layui-input"> ~~~ 后臺 ~~~ $path = 'application/extra/web.php'; $file = (include $path); $config = array( 'WEB_TIT' => input('WEB_TIT'), 'WEB_COM' => input('WEB_COM')); $res = array_merge($file, $config); $str = '<?php return ['; foreach ($res as $key => $value) { $str .= '\'' . $key . '\'' . '=>' . '\'' . $value . '\'' . ','; } $str .= ']; '; if (file_put_contents($path, $str)) { return tpta('修改成功'); } else { return tptb('修改失敗'); } ~~~ #### 寫入數據庫 前臺代碼 ~~~ <input type="text" name="site_config[site_title]" value="{$site_config.site_title}" required lay-verify="required" placeholder="請輸入網站標題" autocomplete="off" class="layui-input"> ~~~ 后臺代碼 ~~~ /** * 顯示資源列表 * * @return \think\Response */ public function index() { if (Cache::has('site_config')){ //查詢緩存 $System['value']=Cache::get('site_config'); }else{ //查詢數據庫 $System=SystemModel::where('name', 'site_config') -> field('value')->find(); } $site_config = unserialize($System['value']); return $this->fetch('index', ['site_config' => $site_config]); } /** * 提交配置 */ public function updateSiteConfig() { $site_config = $this->request->post('site_config/a'); $value=serialize($site_config); if (SystemModel::where('name', 'site_config')->setField('value' , $value)) { Cache::set('site_config', $value); $this->success('提交成功'); } else { $this->error('提交失敗'); } } ~~~
                  <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>

                              哎呀哎呀视频在线观看