摘要: //图片处理 public function img(){ //读取图片 $image=Image::open('./img/02.jpg'); //dump($image); //获取图片的信息 // 返回图片的宽度 $width = $image->width(); // 返回图片的高度 $he 阅读全文
posted @ 2018-05-16 19:17 奔跑的茄子 阅读(170) 评论(0) 推荐(0)
摘要: <?php /** * Created by PhpStorm. * User: admin.Li * Date: 2018/5/16 * Time: 17:17 */ namespace app\index\controller; use think\Controller; class Yzm e 阅读全文
posted @ 2018-05-16 18:31 奔跑的茄子 阅读(135) 评论(0) 推荐(0)
摘要: //文件上传页面 public function add(){ return $this->fetch(); } //单个文件上传的方法 public function upload(Request $request){ // 获取表单上传文件 例如上传了001.jpg $file=$request 阅读全文
posted @ 2018-05-16 16:58 奔跑的茄子 阅读(92) 评论(0) 推荐(0)
摘要: <?php /** * Created by PhpStorm. * User: admin.Li * Date: 2018/5/16 * Time: 11:53 */ namespace app\index\controller; use think\Controller; use think\D 阅读全文
posted @ 2018-05-16 15:07 奔跑的茄子 阅读(227) 评论(0) 推荐(0)
摘要: <?php /** * Created by PhpStorm. * User: admin.Li * Date: 2018/5/16 * Time: 10:40 */ namespace app\index\controller; use think\Cookie; use think\Contr 阅读全文
posted @ 2018-05-16 11:18 奔跑的茄子 阅读(157) 评论(0) 推荐(0)
摘要: //设置SESSION public function setSession(){ //Session::set('name','张三'); //dump(session('age','28')); //设置数组 $data=array( 'name'=>'张三', 'age'=>26, 'sex' 阅读全文
posted @ 2018-05-16 10:38 奔跑的茄子 阅读(98) 评论(0) 推荐(0)
摘要: //缓存的使用 public function huancun(){ $data=cache('userData'); //从缓存中获取数据 if ($data){ echo "缓存中获取"; }else{ echo "数据库中获取"; //如果没有从数据库获取 $data=Db::table("u 阅读全文
posted @ 2018-05-16 09:44 奔跑的茄子 阅读(124) 评论(0) 推荐(0)