2017年3月25日
摘要: 最简单方式:$_SERVER['DOCUMENT_ROOT'],暴力通俗易懂,网站根目录,GG. 将下面的代码放在网站根目录下的一个文件中,以便在其它文件中引用。 路径方式: define('BASE_PATH',str_replace('\\','/',realpath(dirname(__FIL 阅读全文
posted @ 2017-03-25 10:41 上善若水-随 阅读(79444) 评论(0) 推荐(1) 编辑
  2017年3月21日
摘要: Left Join / Right Join /inner join相关关于左连接和右连接总结性的一句话:左连接where只影向右表,右连接where只影响左表。Left Joinselect * from tbl1 Left Join tbl2 where tbl1.ID = tbl2.ID左连接 阅读全文
posted @ 2017-03-21 15:21 上善若水-随 阅读(122115) 评论(0) 推荐(7) 编辑
  2017年3月17日
摘要: 阅读全文
posted @ 2017-03-17 17:14 上善若水-随 阅读(164) 评论(0) 推荐(0) 编辑
  2017年3月10日
摘要: 在微信公众平台的开发过程中,我们有时需要开发网页并判断是否是是来自微信浏览器访问,本文介绍如何做出这一判断。 一、$_SERVER数组 $_SERVER 是一个包含了诸如头信息(header)、路径(path)、以及脚本位置(script locations)等等信息的数组。这个数组中的项目由 We 阅读全文
posted @ 2017-03-10 16:00 上善若水-随 阅读(3275) 评论(0) 推荐(2) 编辑
  2017年3月4日
摘要: 1 第一种: 2 删除 3 4 5 6 第二种: 7 20 //调用 21 " onclick="javascript:del_sure()">删除 22 23 24 第三种: 25 30 删除 阅读全文
posted @ 2017-03-04 08:43 上善若水-随 阅读(681) 评论(0) 推荐(0) 编辑
  2017年2月23日
摘要: header("Content-type:text/html;charset=utf-8"); 阅读全文
posted @ 2017-02-23 16:38 上善若水-随 阅读(562) 评论(0) 推荐(0) 编辑
  2017年2月14日
摘要: if($code['result_code'] !='FAIL') { echo ""; //echo "退款成功"; ; }else{ echo ""; } 阅读全文
posted @ 2017-02-14 17:34 上善若水-随 阅读(2790) 评论(0) 推荐(0) 编辑
  2017年1月8日
摘要: 1 'beauty', "upload"=>"@a.zip"); 14 curl_setopt($ch, CURLOPT_POST, 1); 15 curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 16 //**************************************************************************... 阅读全文
posted @ 2017-01-08 16:41 上善若水-随 阅读(988) 评论(0) 推荐(0) 编辑
摘要: 2 php的header来定义一个php页面为utf编码或GBK编码 3 4 php页面为utf编码 5 header("Content-type: text/html; charset=utf-8"); 6 7 php页面为gbk编码 8 header("Content-type: text/html; charset=gb2312"); 9 10 php页面为... 阅读全文
posted @ 2017-01-08 08:12 上善若水-随 阅读(8911) 评论(0) 推荐(0) 编辑
摘要: 1 #php变量与数组相互转换的方法(extract与compact) 2 3 #compact 多个变量转数组 4 $name = 'sui'; 5 $email = 'sui@qq.com'; 6 $arr = compact('name','email'); 7 print_r($arr); 8 9 #extract 数组转多个变量 10 //数组转多个变量 11 $... 阅读全文
posted @ 2017-01-08 08:07 上善若水-随 阅读(4013) 评论(0) 推荐(0) 编辑