php
文章平均质量分 55
6大少
gogogo
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PHP img标签替换为mip-img标签的方法
function replaceMipImages($content){ preg_match_all('/<img (.*?)\>/', $content, $images); if(!is_null($images)) { foreach($images[1] as $index => $value){ $mip_...原创 2020-01-09 13:36:26 · 548 阅读 · 0 评论 -
PHP7根目录可以采集,子目录不行的神奇的错误
PHP7$url = "https://www.baidu.com/";$html = file_get_content($url);没有找到原因! 根目录可以运行 子目录直接500本地环境以前写的子目录采集也没有问题什么坑?...原创 2019-10-25 10:40:02 · 297 阅读 · 0 评论 -
PHP平铺水印
$bigImgPath = "logo.png";$logo = "logo2.png";$im = imagecreatefromstring(file_get_contents($bigImgPath));//获取水印源$watermark = imagecreatefromstring(file_get_contents($logo));//获取图、水印 宽高类型list($bg原创 2017-10-18 09:45:30 · 1724 阅读 · 0 评论 -
PHP生成网站sitemap.xml
php生成xml sitemap文件原创 2017-10-24 14:46:17 · 3565 阅读 · 0 评论 -
php 快速输出excel报表
此代码仅供参考 function outputReport(){ if($_GET['start']&&$_GET['end']){ $start = strtotime($_GET['start']); $end = strtotime($_GET['end']); $deals = $GLOBALS["db"]->getAll("select d原创 2017-11-06 09:07:20 · 405 阅读 · 0 评论 -
php微信支付官方SDK简单开发
首先要配置好 WxPay.Config.php内的 APPID MCHID KEY 问题1:错误码58 退款需要证书 配置SSLCERT_PATH SSLKEY_PATH 要写绝对路径 不然会错误码58问题2:错误码60 WxPay.Api.php修改 curl_setopt($ch,CURLOPT_SSL_VERIFYPE原创 2017-12-12 17:02:47 · 2620 阅读 · 0 评论 -
php支付宝接口官方SDK简单开发
我用的官方sdk https://docs.open.alipay.com/270/106291/直接aop文件夹放到PHP环境 配置 AopClient.php这个文件 秘钥和公钥搞了一会 这个一定要配置正确//应用IDpublic $appId //私钥值 public $rsaPrivateKey//支付宝公钥public $alipayrsaPublicK原创 2017-12-07 13:51:59 · 10202 阅读 · 0 评论 -
php直接操作mysql
set_time_limit(0); error_reporting(NULL); header("Content-type: text/html; charset=GBK"); date_default_timezone_set(PRC);$t1 = microtime(true);$conn = @ mysql_connect("localhost:3306", "r原创 2017-12-30 16:07:45 · 267 阅读 · 0 评论
分享