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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                **phpGrace 函數小工具** phpGrace 封裝了一些常用的工具函數,小巧、輕快!但卻極大程度的方便了開發 ! **1、p($var, $type = false) - 打印變量** p 函數是 print\_r 和 var\_dump 函數的組合,參數: ~~~ 1、需要打印的值 2、可選參數?【默認?false】?默認使用?print_r?打印變量,?為?true?時使用?var_dump?打印變量 ~~~ **2、pgExit($msg) - 終止運行** ~~~ $msg?可選參數?【默認?""】 ~~~ **3、isSelected($val1, $val2) - 動態設置 option 選中狀態,示例** ~~~ <select?name=""> ????<?php ????$array?=?array( ????????1?=>?'php', ????????2?=>?'.net', ????????3?=>?'jave' ????); ????$currentKey?=?2; ????foreach($array?as?$k?=>?$v){ ?????> ????<option?value="<?php?echo?$k;?>"<?php?isSelected($k,?$currentKey);?>><?php?echo?$v;?></option> ????<?php?}?> </select> ~~~ **4、trimAll($val) - 去除全部空白字符** ~~~ <?php class?indexController?extends?grace{ ????public?function?index(){ $str?=?trimAll('?g r? a?ce?'); ????????echo?$str; ????} } ~~~ **5、dataToOption($data, $currentId = 0) - 將符合規則的數組轉換為option** 參數: ~~~ 1、符合規則的數據?【array(值?=>?名稱),如:array(1?=>?'男',?2=>?'女');】 2、選中數據?id ~~~ 演示: ~~~ <select?name=""> <?php $array?=?array(1?=>?'php',?2?=>?'.net',?3?=>?'jave'); dataToOption($array,?2); ?> </select> ~~~ **6、tool($toolName, $arguments)?** 工具實例化函數( 適用于不能使用命名空間的工具類,自動加載且保證一次加載 ) ~~~ 參數:1、工具類名稱?2、對應參數【根據工具類構造函數決定參數個數】 ~~~ 演示 ~~~ $excel?=?tool('PHPExcel'); $tool??=?tool('test',?1?,?'grace'); ~~~ **7、initPOST** 功能 : 修正POST參數(不存在則賦值為指定的值) 參數 :? 1、name 鍵名稱 2、value 修正后的值【默認 空】 返回 : 修正后的值 ~~~ <?php echo?initPOST('name',?'hi...'); ~~~
                  <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>

                              哎呀哎呀视频在线观看