上一页 1 ··· 3 4 5 6 7 8 下一页
  2017年8月2日
摘要: getAccessToken(array('id' => 1)); //赋值公众号的appid和secret self::$appid = $data['nf_appid']; self::$secret = $data['nf_appsecret']; //判断数据库里值是否为空 if (empty($data['... 阅读全文
posted @ 2017-08-02 16:59 泪滴 阅读(269) 评论(0) 推荐(0) 编辑
  2017年7月6日
摘要: InnoDB 支持事物 阅读全文
posted @ 2017-07-06 14:46 泪滴 阅读(133) 评论(0) 推荐(0) 编辑
  2017年7月5日
摘要: php 后端配置 config.json 修改 图片访问路径前缀,为自己服务器的域名 上传保存路径,可以自定义保存路径和文件名格式 Upload.class.php 修改 /** * 获取文件完整路径 * @return string */ private function getFilePath( 阅读全文
posted @ 2017-07-05 17:38 泪滴 阅读(208) 评论(0) 推荐(0) 编辑
  2017年6月6日
摘要: function change() { $pdf_file = './pdf/demo.pdf'; $save_to = './jpg/demo.jpg'; //make sure that apache has permissions to write in this folder! (common problem)//execute ImageMagick command 'co... 阅读全文
posted @ 2017-06-06 18:00 泪滴 阅读(143) 评论(0) 推荐(0) 编辑
摘要: function qr_code($data, $type = "TXT", $size = '150', $ec = 'L', $margin = '0') { $types = array("URL" => "http://", "TEL" => "TEL:", "TXT" => "", "EMAIL" => "MAILTO:"); if ( 阅读全文
posted @ 2017-06-06 17:59 泪滴 阅读(118) 评论(0) 推荐(0) 编辑
摘要: function Delete($path) { if (is_dir($path) === true) { $files = array_diff(scandir($path), array('.', '..')); foreach ($files as $file) { Delete(realpath($path) . '/' . $file); } ... 阅读全文
posted @ 2017-06-06 17:29 泪滴 阅读(98) 评论(0) 推荐(0) 编辑
摘要: function secsToStr($secs) { if ($secs >= 86400) { $days = floor($secs / 86400); $secs = $secs % 86400; $r = $days . ' day'; if ($days 1) { $r .= 's'; }if ($secs > 0) { ... 阅读全文
posted @ 2017-06-06 17:26 泪滴 阅读(248) 评论(0) 推荐(0) 编辑
摘要: function deny() { if (!file_exists('blocked_ips.txt')) { $deny_ips = array( '127.0.0.1', '192.168.1.1', '83.76.27.9', '192.168.1.163' ); } else { $deny_ips = f... 阅读全文
posted @ 2017-06-06 17:23 泪滴 阅读(170) 评论(0) 推荐(0) 编辑
摘要: function makeClickableLinks($text) { $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)', '\1', $text); $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&//=]+)'... 阅读全文
posted @ 2017-06-06 17:22 泪滴 阅读(168) 评论(0) 推荐(0) 编辑
摘要: function is_validemail($email) { $check = 0; if (filter_var($email, FILTER_VALIDATE_EMAIL)) { $check = 1; } return $check; } 阅读全文
posted @ 2017-06-06 17:21 泪滴 阅读(112) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页