12 2012 档案
摘要:<?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it 将对象放到SESSION中形成单列模式*/ //打开session session_start(); final class CartTool{ private static $cart = null; public static $items = array(); //保护构造函数,防止new final protected function __construct(){ $this->test = mt_ran...
阅读全文
摘要:<!--燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it --><html><head><title>ajax</title><meta http-equiv="content-type"content="text/html;charset=utf-8 "/><script language="javascript"> function $(id){ return document.getElementBy
阅读全文
摘要:<?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it 原型图测试文件*/ header('content-type:text/html;charset=utf-8'); //POST接受数据 $smaller = $_POST['smaller']+0; $middle = $_POST['middle']+0; $college = $_POST['college']+0; $doctor = $_POST['doctor']+0; $all = $s
阅读全文
摘要:<?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it PHP的图片处理类(包括图片的水印,图片的缩略,验证码的实现)*/ class ImageTool{ //获取图片的信息宽高后缀等 public static function getInfo($dis){ $imginfo = getimagesize($dis); $info['width'] = $imginfo[0]; $info['height'] = $imginfo[1]; $info['ext'] = substr(
阅读全文
摘要:<?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it //创建画布 $im=imagecreatetruecolor(300,100); //定义画布的颜色 $white=imagecolorallocate($im,255,255,255); //生成图片 imagefill($im,0,0,$white); //画几个圈图 $gray=imagecolorallocate($im,240,240,240); $red=imagecolorallocate($im,255,0,0); $gren=imagecolorallocat
阅读全文
摘要:<?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it 思路:多文件上传或的数据格式是$_FILES['name'].$_FIELS['error']..都是数组的格式,只要把单文件上传的格式也转变成多文件上传的格式就可以实现多文件上传了 文件上传类 1:处理文件上传的大小 2:处理文件上传的后缀 3:处理文件上传的错误报告 4:处理文件上传的目录 5:处理文件上传的随机名称 其值为 0,没有错误发生,文件上传成功。 */defined('ACC')||exit('NO PERM
阅读全文