摘要:
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)
编辑
摘要:
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)
编辑
摘要:
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)
编辑
摘要:
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)
编辑
摘要:
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)
编辑
摘要:
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)
编辑
摘要:
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)
编辑