摘要:
<?php//图片添加水印效果class imgGD{ protected $im; protected $water; protected $image; protected $img_width; //源图片宽度 protected $img_height; //源图片高度 protected $img_type; //源类型 protected $water_width; //水印图片宽度 protected $water_height; //水印图片高度 protecte... 阅读全文
摘要:
<?php//购物车类//实现方式:单例加session//方法:/***添加商品修改商品商品+1商品-1删除商品显示商品列表计算商品的总类计算商品的总数量计算商品的总价格清空购物车**/class cart{ static protected $ins = false; protected $items = array(); //构造函数 final protected function __construct(){} //克隆 final protected function __clone(){} //实例化类的静态方法 protected... 阅读全文
摘要:
<?php//文件上传类class upload{ protected $allowExt = array('jpg','jpeg','gif','png','bmp'); //定义允许上传的类型 protected $max_size = 2; //允许最大上传文件大小 protected $fpath = array(); protected $errorno = 0; //错误号 protected $error = array( 0=>'上传完成', 1=>'文件超 阅读全文
摘要:
<?phpclass page{ protected $total; //总条数 protected $perpage = 10; //每页显示的天数 protected $count; //总页数 protected $page = 1; //当前页数 protected $uri; //url地址 protected $style = 1; //分页显示的样式 public function __construct($total,$perpa... 阅读全文