php 948

#PHP
生成指定个数的随机红包

<?php $total=20;//红包总金额 $num=10;// 分成10个红包,支持10人随机领取 $min=0.01;//每个人最少能收到0.01元 $redpack…

2015-12-15 695

#PHP
获取本周一,本周日,上周一,上周日,上月初,月底

<?php class datefl{ /** * 本周一 * @param int $timestamp 某个月的某一个时间戳,默认为当前时间 * @param strin…

2015-12-15 451

#PHP
php读取和保存base64编码的图片内容

<?php header('Content-type:text/html;charset=utf-8'); //读取图片文件,转换成base64编码格式 $image_fil…

2015-12-15 758

#PHP
500错误 详情打印

error_reporting(E_ALL); function cache_shutdown_error() { $_error = error_get_last(); if (…

2015-12-15 340

#PHP
PHP解析微信支付结果

$msg = array(); $postStr = file_get_contents('php://input'); $msg = (array)simplexml_load_…

2015-12-15 421

#PHP
两个日期之间的所有时间

function DateRange ($begin,$end,$interval='M'){ $begin = new DateTime($begin); $end = new …

2015-12-15 394

#PHP
熟悉web编程技术

<?php echo 22; ?>

2015-12-15 971

#PHP
php ping端口

error_reporting(0); header("content-Type: text/html; charset=utf-8"); set_time_limit(120);…

2015-12-15 411

#PHP
下载百度搜索图片

$brand = 'logo'; $url = "http://image.baidu.com/search/index?tn=baiduimage&ipn=r&c…

2015-12-15 330

#PHP
php多维数组转一维数组

function arrToOne($multi) { $arr = array(); foreach ($multi as $key => $val) { if( is_a…

2015-12-15 344

#PHP
历史上的今天接口api

http://www.ipip5.com/today/api.php?type=txt

2015-12-15 792

#PHP
PHP PDO操作mysql不注意的话依然存在SQL注入

<?php dbh = new PDO("mysql:host=localhost; dbname=demo", "user", "pass"); $dbh->setA…

2015-12-15 792
1 12 13 14 15 16 79