原创 通過pecl方式安裝php擴展

1、安裝pecl及創建快捷鍵(若安裝php時已帶可忽略這步安裝步驟)   # cd /usr/local/php/bin/ //可查看是否已帶有pecl # wget http://pear.php.net/go-pear.ph

原创 C#數據類型轉換類

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace BaseTools { pu

原创 php實現微信小程序內容安全接口校驗

define('MSG_SEC_CHECK','https://api.weixin.qq.com/wxa/msg_sec_check?');//小程序敏感詞檢查 define('IMG_SEC_CHECK','https://api.

原创 php常用幾種設計模式的應用場景

1.單例設計模式 所謂單例模式,即在應用程序中最多隻有該類的一個實例存在,一旦創建,就會一直存在於內存中! 單例設計模式常應用於數據庫類設計,採用單例模式,只連接一次數據庫,防止打開多個數據庫連接。 一個單例類應具備以下特點:

原创 php實現微信小程序圖文安全接口校驗

define('MSG_SEC_CHECK','https://api.weixin.qq.com/wxa/msg_sec_check?');//小程序敏感詞檢查 define('IMG_SEC_CHECK','https://api.

原创 cURL上傳文件(兼容5.5及5.6以上php版本)

function http_post_media($url,$path){ $ch = curl_init(); if(class_exists('\CURLFile')){//兼容php版本>=5.5

原创 php處理生成圓形圖

/** * 處理圓形圖 * @param $image 圖片地址 * @return string */ function round_image($image) { $logo = imagecreatefromstr

原创 版本控制器之SVN的安裝、配置、hooks配置及使用

1、subversion安裝(已安裝跳過) yum install -y subversion svn --version 2、創建版本庫(根目錄以:/var/svn/爲例,以:/var/svn/test爲某一個倉庫) mkdir -

原创 C#數據類型裝換類

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace BaseTools { pu

原创 tp5.1整合gateway

1、安裝think-gateway:composer require evan-li/think-gateway 2、項目新建應用(eg:application/worker) 3、處理gateway配置文件,將下載的think-gate

原创 nginx中HTTP自定義header有時候接收不到,無內容分析

1、出現此問題需滿足的條件: 使用了nginx作爲反向代理 自定義header的key中使用了"_",而不是“-” 2、原因: #在ngx_http_parse_header_line()函數中 if(ch == '_'){ i

原创 mysql 實現拼接表中的字段字段

mysql 的concat函數可以實現數據庫中字段的自由拼接 並且保存成臨時字段 mysql> select id,username,concat( id, '-' , username) as truename from pri_ad