原创 ThinkPHP中I函數的修飾符
如果獲取的值爲空修飾符是不起作用的,所以設置好默認值非常有必要。 $age=I('age/d',18); 修飾符 作用 s 強制轉換爲字符串類型 d 強制轉換爲整形類型 b 強制轉換爲布爾類型 a
原创 jQuery實時合計
$('.sum').on('keyup change', function () { var sum_result = 0 $('.sum').each(
原创 layuiAdminIframe默認隱藏側邊欄
index.html找到對應id的元素修改class即可 id="LAY_app" class="layadmin-tabspage-none layadmin-side-shrink" id="LAY_app_flexibl
原创 uni-app APP-PLUS 獲取客戶端信息 clientid 等
// /App.vue onLaunch: function() { // #ifdef APP-PLUS const clientInfo = plus.push.getClientInfo() console.log(c
原创 php 強制跳轉到https
if(!isset($_SERVER['HTTPS'])||$_SERVER['HTTPS']=='off'){ header("HTTP/1.1 301 Moved Permanently"); header('
原创 layuiAdminIframe更改主題配置不生效
F12→Application選項卡→Local Storage 刪除鍵值爲layuiAdmin的項 點贊 收藏 分享 文章舉報 sr_www 發佈了80 篇原創文章
原创 IIS強制HTTPS&ThinkPHP隱藏index.html
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <clear />
原创 ThinkPHP將CheckBox值轉爲0/1
<input type="checkbox" name="ent_logoimgstatus" <eq name="row[logoimgstatus]" value="1
原创 以逗號分隔的字符串是否交集函數
delimiter $$ use `tzjob`$$ drop function if exists `is_mixed`$$ create definer=`root`@`localhost` function `is_m
原创 javascript|es6|計算字符串長度的方法
這種方法的好處在於:可以正確處理各種Unicode字符,不會將大於\uFFFF的Unicode字符算作2個字符。 //第一種:使用擴展運算符 [...str].length //第二種:使用Array.form()方法 Arr
原创 微信小程序圖片緩存問題
可以在服務器端或者客戶端在圖片後綴名之後加上“?隨機數”即可 function imgs(){ $arr=[ 'https://domain/Public/img/1.jpg?'.rand(), 'https:
原创 ThinkPHP公共delete方法
function delete($id=0){ $d=D($this->tb); if(!$d->delete($id)){ $this->error($d->getError()); } $this->success
原创 將$emit寫在template代碼中
<input type="search" @keyup.enter="$emit('search',$event.target.value)" />
原创 php將textarea內容根據換行轉換數組
$arr=explode("\r\n",I('textarea'));
原创 javascript 把日期字符串替換成數字串
datetimeStr.replace(/ |:|-/g,'')