随笔分类 -  php

php笔记
摘要:1、stripos():函数查找字符串在另一字符串中第一次出现的位置 列如 2、strtr():函数转换字符串中特定的字符 列如:strtr("Hilla Warld","ia","eo"); 3、array_diff_assoc():函数用于比较两个(或更多个)数组的键名和键值 ,并返回差集 列如 阅读全文
posted @ 2017-12-08 17:13 pengcx 阅读(151) 评论(0) 推荐(0)
摘要:/** * ---------------------------------------------- * 操作成功跳转的快捷方法 * @access protected * @param string $message 提示信息 * @param string $jumpUrl 页面跳转地址 * @param mixed $a... 阅读全文
posted @ 2017-11-21 14:59 pengcx 阅读(1130) 评论(0) 推荐(0)
摘要:strtolower(preg_replace('/((?<=[a-z])(?=[A-Z]))/', '_', 'AbcDef')) 阅读全文
posted @ 2017-10-24 16:42 pengcx 阅读(182) 评论(0) 推荐(0)
摘要:phpinfo()函数 阅读全文
posted @ 2017-09-21 13:02 pengcx 阅读(107) 评论(0) 推荐(0)
摘要:$ip = 'IP地址';echo $intip = sprintf('%u',ip2long($ip)); //转换为无符号整型echo long2ip($intip);//将整型转换为ip 阅读全文
posted @ 2017-09-15 13:09 pengcx 阅读(614) 评论(0) 推荐(0)
摘要:foreach ($list as $key=>$val){ $data=array();//这一个一定要加上不然循环后,modify_one,modify_two都会赋值 if ($val['id']!=1){ $link = explode("801",$val['p_link']); if (isset($link['1'])){ ... 阅读全文
posted @ 2017-09-08 15:16 pengcx 阅读(5038) 评论(0) 推荐(0)
摘要:public function gethttpcode($url){ $ch = curl_init (); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 2); curl_setopt($ch, CURLOPT_HEADER, FAL... 阅读全文
posted @ 2017-09-07 18:02 pengcx 阅读(469) 评论(0) 推荐(0)
摘要:public function sortArray($ArrayData,$KeyName1,$SortOrder1 = "SORT_ASC",$SortType1 = "SORT_REGULAR"){ if(!is_array($ArrayData)) { return $ArrayData; } // Get args number. $Arg... 阅读全文
posted @ 2017-08-08 09:53 pengcx 阅读(170) 评论(0) 推荐(0)
摘要:1、相加 string bcadd(string left operand, string right operand, int [scale]); 2、相减 string bcsub(string left operand, string right operand, int [scale]); 阅读全文
posted @ 2017-04-17 09:48 pengcx 阅读(2940) 评论(0) 推荐(0)