<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 功能強大 支持多語言、二開方便! 廣告
                ### 微擎常用不需要加載自帶函數 ~~~ 寫入cookie 過期時間秒,0表示跟隨瀏覽器,false,不允許js讀取 isetcookie($key, $value, $expire = 0, $httponly = false) 獲取客戶端IP $ip = getip(); 隨機字符串,6是長度,1為是否數字, random(6,true); 獲取表明 tablename('account') c、a、do,a為webapp(PC)、wxapp(小程序) site(公眾號) 生成如下地址 true不帶微信拼接字符,第二個true表示添加域名 murl('entry/site/fm',['m'=>'yoby_test'],false,true) 一般手機端 $this->createMobileUrl('rank',[]); $this->createWebUrl('rank',[]); wurl('site/entry/rank',['m'=>'yoby_test']);//后臺管理 分頁 pagination($total, $pageIndex, $pageSize = 15); 返回媒體或圖片路徑 tomedia($src) 查找字符串 strexists('helloworld', 'h'); 截取字符串 cutstr($string,$length, TRUE,'utf-8'); 計算字符串長度,中英文都為1 istrlen('hello-微擎'); 字符串加密或解密,默認解密,ENCODE加密,key秘鑰,0過期時間 authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) emoji_unicode_decode()emoji_unicode_encode 解碼emoji get_first_pinyin($str)拼音首字母 ihtml_entity_decode 顯示html array2xml xml2array xml數組互換 ~~~ web默認加載,微信端也有以下函數 ~~~ 第二個參數為空,不跳轉,warning警告,error錯誤,info提示,ajax message('成功', referer(), 'success'); ajax 返回 {"message":"\u6210\u529f","redirect":"","type":"ajax"} 模板加載 template('common/template'); iajax(code,message,redirect);參數2支持數組或字符串 itoast("配置保存成功", referer(), 'success'); ~~~ ### 文件操作函數 ~~~ load()->func('file'); file_copy(IA_ROOT . '/web', IA_ROOT . '/data', array('php')) 文件復制 過濾php file_delete('test.png'); file_image_crop(IA_ROOT . '/test.png', IA_ROOT . '/test2.png', 50, 50); 剪切 file_image_thumb(IA_ROOT . '/test.png', IA_ROOT . '/test2.png', 500); 生成縮率圖 最后是寬 file_move(IA_ROOT . '/test.log', IA_ROOT . '/web/test.log');文件移動 file_upload($_FILE['test'], 'image', 'test.png'); 上傳 file_write(IA_ROOT . '/test.log', 'hello-world');文件寫入 mkdirs(IA_ROOT . '/web/hello/world/example');創建目錄 file_remote_delete遠程刪除 寫入遠程 $filename ="images/$weid/yoby_tougao_".$snid.'.jpg'; file_write($filename, $data); if (!empty($_W['setting']['remote']['type'])) { // 判斷系統是否開啟了遠程附件 $remotestatus = file_remote_upload($filename); //上傳圖片到遠程 if (is_error($remotestatus)) { message('遠程附件上傳失敗,請檢查配置并重新上傳') ; } } ~~~ ### http操作函數 ~~~ load()->func('communication'); $result = ihttp_get('http://x.com')['content']; 文件上傳@+絕對路徑 $result = ihttp_post('https://www.baidu.com', array('username' => 'we7')); 高級請求,第三個參數附加傳入 ihttp_request($url, $post = '', $extra = array(), $timeout = 60) ~~~ 記錄日志 ~~~ load()->func('logging'); logging_run('記錄字符串日志數據'); logging_run([1,2,3]); ~~~ 用戶中心 ~~~ load()->model('mc'); 檢測是否登錄,沒登陸跳到登陸 checkauth();用于微信端 checklogin()用于web openid轉換uid $uid = $_W['member']['uid']; Array ( [uid] => 10128 [realname] => 用戶昵稱 [mobile] => 手機號碼 [email] => 郵箱 [groupid] => 用戶組ID [groupname] => 用戶組名稱 [credit1] => 積分 [credit2] => 余額 [credit3] => 其它積分 [credit4] => 其它積分 [credit5] => 其它積分 [credit6] => 其它積分 ) $uid = mc_openid2uid($openid); $openid = mc_uid2openid($uid); mc_credit_update($uid,'credit2', -10,[$uid,'測試減少10積分']);//增減積分 $num = mc_credit_fetch($uid,['credit2']);//查詢積分 積分通知 mc_notice_credit1($openid, $uid, 10, '充值積分到賬10分', $url = 'http://w.cn', $remark = '謝謝惠顧,點擊查看詳情'); 彈出填寫信息 mc_require($openid,['realname', 'mobile']); 更新填寫信息 mc_update($openid,['email' => 'test@163.com']); 查詢用戶信息uid,返回字段 mc_fansinfo($uidoropenid) Oauth獲取用戶信息 mc_oauth_userinfo($acid) 通過openid獲取 mc_oauth_fans($openid) 查詢用戶信息 mc_fetch($uid/openid,[])返回字段 uid,mobile,credit1積分,credit2余額,realname,nickname,avatar,gender 1男2女,residecity市 ~~~ 自定義函數 ~~~ 微信中做了base64的加密字符串解密,解密之前不需要base64解密 openssl_decrypt($wechat_data['req_info'], "AES-256-ECB", md5('appid')); serialize unserialize 序列化 extract($arr);compact('a','b','c','d','i');解碼成字符串 explode('-','1-2-3-4');//分割成數組 implode('-',$arr);//轉換成字符串 mb_convert_encoding('李太白',"utf-8",'auto');自動轉換成uft8 foreach($list as &$row){ 處理數據 } unset($row); ~~~ 支付幾種返回 ~~~ $wechat = uni_setting(1, array('payment')); 借用返回 Array ( [payment] => Array ( [credit] => Array ( [switch] => ) [alipay] => Array ( [switch] => [account] => [partner] => [secret] => ) [wechat] => Array ( [switch] => 2 [account] => 1 [signkey] => [partner] => [key] => [borrow] => 2 ) [delivery] => Array ( [switch] => ) ) ) 本身返回 Array ( [payment] => Array ( [wechat] => Array ( [switch] => 1 [version] => 2 [apikey] => J8BNZ88rR8hhHH9Z7bqhbB57HbQOp3F9 [mchid] => 1493418902 [account] => 2 [signkey] => J8BNZ88rR8hhHH9Z7bqhbB57HbQOp3F9 ) ) ) 非支付id返回 Array ( [payment] => Array ( [wechat] => Array ( [switch] => 2 [borrow] => 2 [account] => 3 [signkey] => ) ) ) ~~~
                  <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>

                              哎呀哎呀视频在线观看