摘要: 当前周的开始时间(周一)$begintime = mktime(0, 0, 0, date('m'), (date('d') - (date('w')>0 ? date('w') : 7) + 1), date('Y'));当前周的结束时间(周天)$endtime = mktime(0, 0, 0, 阅读全文
posted @ 2017-08-01 15:53 py卡卡 阅读(1112) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> function getcitytext(){ citytext = ''; $(".citylist select").each(function(){ if($(this).val()>0){ citytext += $(this) 阅读全文
posted @ 2017-08-01 14:32 py卡卡 阅读(162) 评论(0) 推荐(0) 编辑
摘要: /** * 统计文件数和文件大小 */private function getFileCacheCount($pathName){ $data = [ 'num' => 0, 'size' => 0 ]; $dir = opendir($pathName); while(false !== ($fi 阅读全文
posted @ 2017-08-01 10:40 py卡卡 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 模型中的方法 class 模型名{ /** * 通过ID获取文件名称 */ public static function getNameById($id) { $model = self::findOne($id); if($model) { return $model->file_name; } 阅读全文
posted @ 2017-08-01 10:34 py卡卡 阅读(211) 评论(0) 推荐(0) 编辑
摘要: /** * 递归删除目录中文件 * @param $pathname * @return bool */public static function delDir($pathname)//要删除的目录{ if(file_exists($pathname)) { if(is_file($pathnam 阅读全文
posted @ 2017-08-01 10:29 py卡卡 阅读(115) 评论(0) 推荐(0) 编辑
摘要: /** * 删除文件缓存 */public function actionDelfilecache(){ $cachePath = Yii::getAlias('@app/runtime/cache');//文件绝对路径 $fileArray = scandir($cachePath);//将文件夹 阅读全文
posted @ 2017-08-01 10:19 py卡卡 阅读(401) 评论(0) 推荐(0) 编辑
摘要: <a href="<?=Url::to(['default/logout']);?>" title="退出"><span class="glyphicon glyphicon-log-out"></span></a> class DefaultController extends Controlle 阅读全文
posted @ 2017-08-01 10:12 py卡卡 阅读(231) 评论(0) 推荐(0) 编辑