原创 thinkphp5框架結合mysql實現微信登錄和自定義分享鏈接與圖文功能示例

這篇文章主要介紹了thinkphp5框架結合mysql實現微信登錄和自定義分享鏈接與圖文功能,涉及基於curl的微信接口調用、數據庫操作等相關使用技巧,需要的朋友可以參考下 本文實例講述了thinkphp5框架結合

原创 php curl獲取302跳轉後的鏈接

單個獲取 function get_redirect_url($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_URL, $url); curl_se

原创 phpexcel實現excel導出

//使用前記得安裝phpexcel //composer require phpoffice/phpexcel use PHPExcel_IOFactory; use PHPExcel;

原创 php實現多csv文件導出zip壓縮包

使用phpexcel生成csv文件 $fileNameArr = array(); foreach ($list as $ii => $group_data) { $csv_title = $ii;

原创 原生php+jquery.form.js異步上傳文件

html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="description" content

原创 php實現簡單鏈式操作mysql數據庫類

<?php $dbConfig = require_once(dirname(__FILE__).'/config.php'); class Db{     public $conn;     private $host = null

原创 php+phantom.js實現繞過ClourFare或百度雲加速驗證

下載phantomjs  官網地址http://phantomjs.org/download.html 創建getCookie.js var page = require('webpage').create() page.setting

原创 thinkphp5實現根據渠道號不同實現安卓和IOS的APP支付和H5支付

<?php namespace app\api\controller; use think\Controller; use app\common\model\ShopInfo as ShopInfoModel; use app\comm

原创 php+mysql實現短信驗證碼功能

class Sms { const EXPIRE_SEC = 300; // 過期時間間隔 5分鐘 const RESEND_SEC = 60; // 重發時間間隔 const ONE_DAY_FREQ = 10

原创 thinkphp5實現ios蘋果ApplePay內購的驗證流程

創建方法 function curlHtml($url, $data = ''){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_set

原创 php swoole 異步處理任務例子

安裝swoole: 下載官方swoole壓縮包,解壓進入目錄 $ cd swoole # 進入 swoole 目錄 $ phpize $ ./configure

原创 php實現簡單的守護進程

前提要安裝有pcntl擴展,可通過php -m查看是否安裝 <?php class Daemon { private $pidfile; function __construct() { $this->

原创 tp3.2實現七牛雲圖片上傳

七牛上傳插件框架已經自帶了的,所以只需配置下然後寫代碼就ok了config.php加入如下配置'UPLOAD_SITEIMG_QINIU' => array( 'maxSize' => 5 * 1024 * 1024,//

原创 nginx實現圖片服務器

location ^~ /poster { alias /home/wwwroot/poster; autoindex on; }

原创 php unserialize返回false的解決辦法

php unserialize失敗返回false原因多半是序列化數據時的編碼與反序列化時的編碼不一致,導致單引號等特殊字符計算長度不正確,所以解決辦法是重新計算長度。百度了很多辦法,全是坑呀,百度的那些辦法根本沒用,都是錯的。所以自己寫了