上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 34 下一页
摘要: /** * @brief 使用HMAC-SHA1算法生成oauth_signature签名值 * * @param $key 密钥 * @param $str 源串 * * @return 签名值 */ 1 function getSignature($str, $key) { 2 $signature = ""; 3 if (function_exists('hash_hmac')) { 4 $ 阅读全文
posted @ 2019-09-23 10:37 没事就更 阅读(1968) 评论(0) 推荐(0) 编辑
摘要: realpath() 函数返回绝对路径。 该函数删除所有符号连接(比如 '/./', '/../' 以及多余的 '/'),并返回绝对路径名。 如果失败,该函数返回 FALSE。 $dir = __DIR__. "/../haha/"; var_dump(realpath($dir)); 阅读全文
posted @ 2019-09-18 11:17 没事就更 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: 安装推荐通过Composer来安装该插件,执行下面的命令来下载插件 composer require kartik-v/yii2-widget-datetimepicker "*"或者在根目录的composer.json文件中添加 "kartik-v/yii2-widget-datetimepick 阅读全文
posted @ 2019-09-10 14:31 没事就更 阅读(1205) 评论(0) 推荐(0) 编辑
摘要: 1 strtotime($end)) { 14 $mend = $end; 15 } 16 $m[] = [ 17 's' => preDate($start), 18 'e' => $mend 19 ]; 20 $start = date(... 阅读全文
posted @ 2019-09-10 12:31 没事就更 阅读(847) 评论(3) 推荐(1) 编辑
摘要: /** * 求两个日期之间相差的天数 * (针对1970年1月1日之后,求之前可以采用泰勒公式) * @param string $day1 * @param string $day2 * @return number */ public function diffBetweenTwoDays($d 阅读全文
posted @ 2019-09-10 12:30 没事就更 阅读(531) 评论(0) 推荐(0) 编辑
摘要: /** * 求两个日期之间相差的天数 * (针对1970年1月1日之后,求之前可以采用泰勒公式) * @param string $day1 * @param string $day2 * @return number */ public function diffBetweenTwoDays($d 阅读全文
posted @ 2019-09-10 12:29 没事就更 阅读(2943) 评论(0) 推荐(0) 编辑
摘要: php的闭包(Closure)也就是匿名函数。是PHP5.3引入的。 闭包的语法很简单,需要注意的关键字就只有use,use意思是连接闭包和外界变量。 为什么要使用闭包: 1.减少foreach的循环的代码 2.减少函数的参数 3.解除递归函数 4.关于延迟绑定 使用示例: <?php$name = 阅读全文
posted @ 2019-08-16 18:18 没事就更 阅读(5121) 评论(0) 推荐(0) 编辑
摘要: if(is_numeric($param['SUBSCRIBER_ID']) true || !empty($param['SUBSCRIBER_ID'])){ } 阅读全文
posted @ 2019-08-08 13:47 没事就更 阅读(1637) 评论(0) 推荐(0) 编辑
摘要: header("Content-type:text/html; charset=utf-8"); $con = mysqli_connect("localhost", "root", "root");$arr = array("刘新平","迟磊","李迪","耿建明","苏晓歌","程春林","王红 阅读全文
posted @ 2019-08-05 16:56 没事就更 阅读(457) 评论(0) 推荐(0) 编辑
摘要: $a = "sss"; echo "{$a}tttt"; //ssstttt; echo '{$a}ttt'; //{a}ttt; $a = "sss"; echo "{$a}tttt"; //ssstttt; echo '{$a}ttt'; //{a}ttt; 双引号中的变量可以解析,单引号就是绝 阅读全文
posted @ 2019-07-18 18:35 没事就更 阅读(240) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 34 下一页