php
waiting丶oppa
这个作者很懒,什么都没留下…
展开
-
php阿拉伯数字金额转中文大写金额
// 阿拉伯数字转中文大写金额public static function num_to_rmb($num) {$c1 = "零壹贰叁肆伍陆柒捌玖";$c2 = "分角元拾佰仟万拾佰仟亿";//精确到分后面就不要了,所以只留两个小数位$num = round($num, 2);//将数字转化为整数$num = $num * 100;if (strlen($num) > 10) {原创 2017-04-28 11:58:28 · 1663 阅读 · 0 评论 -
页码跳转
td colspan="15"> div class="page" id="page"> input type="hidden" name="current_page" value="currentPage"> input type="hidden" name="last_page" value="lastPage"> span class=原创 2017-05-25 13:51:14 · 716 阅读 · 0 评论 -
全选、全不选,批量操作
th>全 选br>input type="checkbox" id="CheckAll" onclick="IsCheckAll()">th>th>a onclick="test()">批量操作th>//全选、全不选function IsCheckAll(){ if(jq('#CheckAll').is(":checked")){ jq(".api_pro_l原创 2017-05-25 13:55:02 · 610 阅读 · 0 评论 -
批量curl请求
//更新价格public function batchupdateSkuPrice($arr){ $url = $this->uri; $method = 'updateSkuPrice'; $start = microtime(true); $ch_list = array(); $multi_ch = curl_multi_init(); fo原创 2017-05-27 09:01:02 · 1902 阅读 · 0 评论 -
特殊字符过滤
function strfilter($str){ $str = str_replace('`', '', $str); $str = str_replace('·', '', $str); $str = str_replace('~', '', $str); $str = str_replace('!', '', $str); $str = str_rep原创 2017-05-27 09:11:30 · 377 阅读 · 0 评论 -
curl请求
function doPosts($url, $req = array(), $isPost = 1,$header = array()){ // create a new cURL resource //Header("Content-Type","text/html;charset=utf-8"); $ch = curl_init();原创 2017-05-27 09:12:14 · 273 阅读 · 0 评论 -
创建日志,记录日志
function pagelog($array,$mesge,$filename=null){ $text = '+------------------------------------------------'; $text .= "\r\n"; $text .= '支付结果推送时间:' . date("Y-m-d H:i:s"); $text .= "\r\n原创 2017-05-10 11:09:00 · 292 阅读 · 0 评论 -
PHP 获取当天、近一周、本周、上月、本月、本季度、上季度时间方法大全
//当天时间$where['time'] = array( array('egt',strtotime(date('Y-m-d',time()))), array('lt',strtotime(date('Y-m-d',time())).'+1 day'));// 本周时间$where['time'] = array( array('egt',strtotime(d原创 2018-01-04 15:54:38 · 1515 阅读 · 0 评论