2020-4-17 aslronx
转载自:https://www.cnblogs.com/yutaoyao/p/4621307.htmlfunction getFile($url, $save_dir = '', $filename = '', $type = 0) { if (trim($url) == '') { return false; } if (trim($save_dir) == '') { $save_dir = './'; } if (0 !== strrpos($save_dir, '/')) { $save_dir.= '/'; } //创建保存目录 if (!file_exists($save_dir) && !mkdir($save_dir, 0777, true)) { return false; } //获取远程文件所采用的方法 if ($type) { $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $content = curl_exec($ch); curl_close($ch); } else { ob_start(); readfile($url); $content = ob_get_contents(); ob_end_clean(); } $size = strlen($content); //文件大小 $fp2 = @fopen($save_dir . $filename, 'a'); fwrite($fp2, $content); fclose($fp2); unset($content, $url); return array( 'file_name' => $filename, 'save_path' => $save_dir . $filename ); } $url = "http://www.baidu.com/img/baidu_jgylogo3.gif"; $save_dir = "down/"; $filename = "test.gif"; $res = getFile($url, $save_dir, $filename, 1); var_dump($res);
标签: PHP
2020-3-28 aslronx
https://www.bt.cn/btcode.html2020-3-23 aslronx
http://javathinker.cn/index.php/archives/107/
https://www.yiqucode.com/shiyonggongju-552.html
QYYBAC9D3J-eyJsaWNlbnNlSWQiOiJRWVlCQUM5RDNKIiwibGljZW5zZWVOYW1lIjoi6LaF57qnIOeoi+W6j+WRmCIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiIiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwiZmFsbGJhY2tEYXRlIjoiMjAyMC0wMS0wNCIsInBhaWRVcFRvIjoiMjAyMS0wMS0wMyJ9LHsiY29kZSI6IkFDIiwiZmFsbGJhY2tEYXRlIjoiMjAyMC0wMS0wNCIsInBhaWRVcFRvIjoiMjAy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入口文件 $request->baseFile(); // 获取当前URL地址 不含域名 $request->url(); // 获取包含域名的完整URL地址 $request->url(true); // 获取当前URL地址 不含QUERY_STRING $request->baseUrl(); // 获取URL访问的ROOT地址 $request->root(); // 获取URL访问的ROOT地址包含域名 $request->root(true); // 获取URL地址中的PATH_INFO信息 $request->pathinfo(); // 获取URL地址中的PATH_INFO信息 不含后缀 $request->path(); // 获取URL地址中的后缀信息 $request->ext(); // 获取当前应用(模块) $request->module(); // 获取当前控制器 $request->controller(); // 获取当前操作名称 $request->action(); // 获取当前请求方法 $request->method(); // 获取当前请求访问地址 $request->type(); // 获取当前访问者 ip地址 $request->ip(); // 获取当前访问者 真实ip地址(防止代理) $request->ip(0,true); // 获取当前请求的id变量 $request->param('id'); // 获取当前请求的所有变量(已过滤) $request->param(); // 获取当前请求的所有变量(原始数据) $request->param(false); // 获取当前请求的所有变量(包含上传文件) $request->param(true); // 获取POST变量中的 id参数 $request->post('id'); // 获取所有的POST变量(已过滤) $request->post(); // 获取所有的POST变量(原始数据) $request->post(false); // 获取GET变量中的 id参数 $request->get('id'); // 获取所有的GET变量(已过滤) $request->get(); // 获取所有的GET变量(原始数据) $request->get(false); // 是否为 GET 请求 $request->isGet(); // 是否为 POST 请求 $request->isPost(); // 是否为 PUT 请求 $request->isPut(); // 是否为 DELETE 请求 $request->isDelete(); // 是否为 Ajax 请求 $request->isAjax(); // 是否为 Pjax 请求 $request->isPjax(); // 是否为手机访问 $request->isMobile(); // 是否为 HEAD 请求 $request->isHead(); // 是否为 Patch 请求 $request->isPatch(); // 是否为 OPTIONS 请求 $request->isOptions(); // 是否为 cli $request->isCli(); // 是否为 cgi $request->isCgi();
2020-3-9 aslronx
今天突然想到了这个东西,刚刚查询了相关内容,和我想的大同小异。 但是很奇怪,关于唯我论的东西,我没有印象以前看过,也许有,也许没有。 也许记忆有偏差吧。 很有意思。2020-3-9 aslronx
别纠结已经失去的东西,要爱护现在拥有的一切,失去的该回来也会回来。 做想做的事,做快乐的事。2020-3-9 aslronx
|
2020-3-8 aslronx
该结束了,100级之后,就没必要再出了,
如今的等级跨度太大了,我觉得很多离开的人,可能也有这个原因吧,
10几年了,人生最好的年华,在这个世界,
当初艾泽拉斯的萌新少年,现在已经30好几,
美好的回忆都在这里,如果有一天我会死去,
很想在这里重生,再亲眼看看艾泽拉斯,
等级的跨度,让现在的升级很累,
曾经想过,暴雪该如何解决这个问题,
我想到的,是平行资料片,两种设想
其一是,1-60级不变,
其他除了最新篇60-70,最新篇70-80,
其二,1-60级不变,所有资料片都是60-70,
但每个资料片的等级是独立的,
就比如,TBC 的60-70 等级,只在外域有效,
去往诺森德,就要重新开始诺森德60-70,
暗影国度的公布,一些设定和我的预想差不多,
但暴雪把经典旧世的内容也平行了,
看的出来,暴雪还是没有免费开放经典旧世的魄力,
挽回这个世界日渐凋零的人气,
完全免费开放经典旧世其实是个很好的方案,
暴雪直接开启的怀旧服,最高在线过百万,
我没查过,这是只在国服,还是全球,
怀旧服,在压榨这个世界最后的,生命,
将有更多人会离开,他们老了,
我没回去,我没时间,
我的离开,最大原因是没了点卡,
以前一个月会用三张点卡,90块,
现在月卡75,但觉得亏,
不是青春年少时,有大把时间去荒废了,
我是个怀旧的人,我怀念的是那个时代,
但时间永远不会倒流,
可以说,很多人,不是他们放弃的,
是他们被放弃了,被时间放弃了,
被暴雪放弃了,
我常回来,建了很多小号,
转转,看看,升到20级,
或者,自己研究mangos,
2020-2-26 aslronx
原始:https://www.cnblogs.com/hmmcsdd/archive/2007/07/16/MangosAreaCode.html
标签: Mangos