摘要:
<?php function check_remote_file_exists($url) { $curl = curl_init($url); // 不取回数据 curl_setopt($curl, CURLOPT_NOBODY, true); // 发送请求 $result = curl_exec($curl); $found = false... 阅读全文
posted @ 2016-10-28 18:03
浮尘微光
阅读(533)
评论(0)
推荐(0)
摘要:
<?php /** * 【php获取目录中的所有文件名】 */ //1、先打开要操作的目录,并用一个变量指向它 //打开当前目录下的目录pic下的子目录common。 $handler = opendir('pic/common'); //2、循环的读取目录下的所有文件 //其中$filename = readdir($handler)是每次循环的时候将读取的文件名赋值给$filen... 阅读全文
posted @ 2016-10-28 18:02
浮尘微光
阅读(7783)
评论(0)
推荐(0)
摘要:
<?php function FileCount($dir){ global $count; if(is_dir($dir)&&file_exists($dir)){ $ob=scandir($dir); foreach($ob as $file){ if($file=="."||$file==".."){ ... 阅读全文
posted @ 2016-10-28 18:01
浮尘微光
阅读(1427)
评论(0)
推荐(0)
摘要:
经常关注linux脚本的人,一定看到过 2>&1 这样的用法,最初一定不明白其中的含义以及为什么是这样的一种组合。昨天偶然间再次看到了这个 2>&1 的写法,遂下决心搞明白其中的含义。 其实要弄清楚 2>&1 的含义,首先应当知道linux中有三种标准输入输出,分别是STDIN,STDOUT,STD 阅读全文
posted @ 2016-10-28 11:46
浮尘微光
阅读(536)
评论(0)
推荐(0)