php 948

#PHP
防止sql注入

function inject_check($sql_str) { return eregi('select|insert|and|or|update|delete|\'|\/\*…

2015-12-15 198

#PHP
apc缓存

Functions to update arrays and get the values from an unique key. <?php function apc_ar…

2015-12-15 380

#PHP
封装 Twitter 访问的 PHP 类

<?php class Twitter { /** * Method to make twitter api call for the users timeline in X…

2015-12-15 1,005

#PHP
AES CBC

class AES_CBC_NoPadding { private $iv; private $key; private $blocksize; public function _…

2015-12-15 434

#PHP
CURL缓存远程文件类

<?php /** * 用于获取远程文件并缓存 * CurlCache v1.0 * Created by cr. * Date: 2015/12/03 */ //names…

2015-12-15 763

#PHP
数字转化为人民币大写

<?php function numTrmb($num) { $d = array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", …

2015-12-15 408

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

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

2015-12-15 715

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

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

2015-12-15 471

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

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

2015-12-15 783

#PHP
500错误 详情打印

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

2015-12-15 357

#PHP
PHP解析微信支付结果

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

2015-12-15 439

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

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

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