上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 整个项目搜索关键字(查找某个字符) 选中项目,点击ctrl+shift+f 若不出来搜索框,试着切换一下输入法,ctrl+空格 选中项目,点击ctrl+shift+f 若不出来搜索框,试着切换一下输入法,ctrl+空格 阅读全文
posted @ 2019-10-29 11:53 好胖的兔子 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 自定义验证类 class BaseModel extends Model { public function rules() { return [ ['obj', ContentSecurityValidator::class], ]; } public function exec() { if ( 阅读全文
posted @ 2019-09-06 15:23 好胖的兔子 阅读(348) 评论(0) 推荐(0) 编辑
摘要: select实现对文本框的显示和隐藏 /** * 通过select的值实现对文本框的显示和隐藏 * #id为一个select控件 * .obj为一个文本框 */ function initSelector() { if ($('#id').val() != 1) { $('.obj').hide() 阅读全文
posted @ 2019-08-27 15:13 好胖的兔子 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 只针对限定1M $data = file_get_contents("输入路径"); $maxSize = 1 * 1024 * 1024; //图片进行压缩 $data = compressImage($data, $maxSize); file_put_contents("输出路径", $dat 阅读全文
posted @ 2019-08-22 15:34 好胖的兔子 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 将图片压缩成jpg或png $type = explode('/', $file->type); $mainType = $type[0]; $subType = $type[1]; $isImage = $mainType == 'image'; $isGif = $subType == 'gif 阅读全文
posted @ 2019-08-22 11:40 好胖的兔子 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 图片验证 public function rules() { return [ [['id'], 'integer'], [['id'], 'required'], [['files'], 'file', 'maxSize' => 50 * 1024 * 1024, 'maxFiles' => 10 阅读全文
posted @ 2019-08-21 10:10 好胖的兔子 阅读(285) 评论(0) 推荐(0) 编辑
摘要: $tempFile = tempnam(sys_get_temp_dir(), 'temp'); $fhandle = fopen($tempFile, 'w'); fwrite($fhandle, $data);//$data为需要写入的数据 fclose($fhandle); unlink($tempFile); 阅读全文
posted @ 2019-08-07 15:15 好胖的兔子 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 点击文字 .window-red{ color: gold; } var flag = true; var color = 'window'; Page({ click:function(){ if(flag){ color = "window-red"; flag = false; }else{ color =... 阅读全文
posted @ 2019-08-05 12:01 好胖的兔子 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 新建项目 生命周期 //app.js App({ onPageNotFount(){ console.log('page not fount');//页面不存在监听函数 }, onError:function(){ console.log('error');//错误监听函数 }, onShow:fu 阅读全文
posted @ 2019-08-05 10:22 好胖的兔子 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 什么是算法 就是任何良定义的计算过程,该过程取某个值或者值的集合作为输入并产生某个值或者值的集合作为输出。 可以看成是用于求解良说明的计算问题的工具 描述一个特定的计算过程来实现该输入/输出关系 问题实例 由计算该问题解所必需的(满足问题陈述中加强的各种约束的)输入组成 就是任何良定义的计算过程,该 阅读全文
posted @ 2019-08-02 13:13 好胖的兔子 阅读(424) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页