07 2017 档案

摘要:public $datas = null; protected function gv($name = '') { if ($this->datas null) { $postStr = file_get_contents("php://input"); $data = json_decode($p 阅读全文
posted @ 2017-07-27 14:11 坚持奔跑在路上 阅读(5088) 评论(0) 推荐(0)
摘要:由于sql语法要求,不可在in后面直接连数组,若数组形式下,则需要转换成逗号隔开的字符串 <?php$arr = array(1,2,3,4,5);$arr_string= join(',', $arr); var_dump($arr_string); 输出:string(9) "1,2,3,4,5 阅读全文
posted @ 2017-07-23 16:16 坚持奔跑在路上 阅读(6950) 评论(0) 推荐(0)
摘要://记录搜索关键字到数据库 public function AddSearchKey($SearchKey,$userinfo=''){ $cip=getip(); if($userinfo!=''){ $cus_id=$userinfo['cus_id']; }else{ $cus_id=0; } 阅读全文
posted @ 2017-07-14 09:52 坚持奔跑在路上 阅读(229) 评论(0) 推荐(0)
摘要:/** 获取ip */function getip() { if(getenv("HTTP_X_FORWARDED_FOR")!=''){ $cip = getenv("HTTP_X_FORWARDED_FOR"); }else{ if ($_SERVER['REMOTE_ADDR']) {//判断 阅读全文
posted @ 2017-07-14 09:50 坚持奔跑在路上 阅读(630) 评论(0) 推荐(0)