原创 php 函數

1,strlen()  函數返回字符串 "Shanghai" 的長度 2,strtoupper()  把所有字符轉換爲大寫 3,substr(string,start,length)  函數返回字符串的一部分 4,strtotime() 

原创 簡單的防止mysql注入

preg_match("/^[a-zA-Z0-9]{6,}$/")addslashes() 函數返回在預定義字符之前添加反斜槓的字符串。

原创 無限極分類之查找家譜樹

方法一:用遞歸法 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <?php function subtree($arr,$parent){ sta

原创 解決MySQL存入中文變問號

出現這種問題的原因有可能是:數據庫字符集不是utf-8,對應character_set_database常量;服務器字符集不是utf-8,對應character_set_server常量;程序與數據庫的連接不是用utf-8編碼,對應cha

原创 PHP難記的

htmlspecialchars_decode  php把字符實體轉換成標籤form method='post' enctype='multipart/form-data'-------上傳文件

原创 js難記的

href="javascript:location.replace(location.href);"點擊刷新本頁面

原创 jquery獲取當前頁面的URL信息

http://blog.csdn.net/championsuiyang/article/details/77879652

原创 圖片居中

圖片居中http://blog.csdn.net/DreamFJ/article/details/68921957

原创 實現不同尺寸圖片通屏輪播

https://www.cnwenhui.cn/html/show-263.html

原创 關於js裏不能用tp3.2的U方法

href=":U('Index/login')"換成完整路徑即可=>href=":U('http://www.gw.com/index.php/home/Index/login')"

原创 php利用表頭header()來下載文件到本地

$url="http://pan.baidu.com/share/qrcode?w=150&h=150&url=http://gandao.my".U('Question/index',array('id'=>$id));   //圖片路

原创 引入PHP文件include和require區別

http://www.jb51.net/article/105743.htm

原创 HTML代碼共用

http://www.cnblogs.com/jtjds/p/5326200.htmlhttps://jingyan.baidu.com/article/a948d6512d1bd50a2dcd2ec1.html

原创 關於H-ui.admin日期插件My97 DatePicker與Think php模版標籤衝突的解決方法

官方解決方法:http://www.h-ui.net/H-ui.admin.shtmlhttp://www.mamicode.com/info-detail-1901002.html