上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: <?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it 思路:多文件上传或的数据格式是$_FILES['name'].$_FIELS['error']..都是数组的格式,只要把单文件上传的格式也转变成多文件上传的格式就可以实现多文件上传了 文件上传类 1:处理文件上传的大小 2:处理文件上传的后缀 3:处理文件上传的错误报告 4:处理文件上传的目录 5:处理文件上传的随机名称 其值为 0,没有错误发生,文件上传成功。 */defined('ACC')||exit('NO PERM 阅读全文
posted @ 2012-12-08 12:48 arvim 阅读(247) 评论(0) 推荐(0) 编辑
摘要: <?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it *//* 跟着十八学做商城 自己在做商品添加详细描述的时候调用编辑器的方法 思路: 1:下载好编辑器包(我下的是FCKeditor); 2:放到一个合适的位置(自己觉得放哪合适都可以); 3:在需要显示编辑器的地方引入编辑器类文件,创建编辑器对象,然后生成编辑器(O啦);*/<?php/* 这里是goodsadd.php goodsadd.html的php引入页面*/ define('ACC',true); require_once("../inc 阅读全文
posted @ 2012-11-30 11:33 arvim 阅读(351) 评论(0) 推荐(0) 编辑
摘要: <?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it */class Mysql{ //拼接sql语句 public function autoExecute($data='',$table,$mode = "insert",$where = "where 1 limit 1"){ //insert 和 update 语句需要传入数组判断 if(is_array($data)){ //Update语句的拼接 ... 阅读全文
posted @ 2012-11-30 09:49 arvim 阅读(1709) 评论(0) 推荐(0) 编辑
摘要: <?php $area = array( array('id'=>1,'name'=>'安徽','parent'=>0), array('id'=>2,'name'=>'海淀','parent'=>7), array('id'=>3,'name'=>'濉溪县','parent'=>5), array('id'=>4,' 阅读全文
posted @ 2012-11-24 01:25 arvim 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 1,'name'=>'安徽','parent'=>0), array('id'=>2,'name'=>'海淀','parent'=>7), array('id'=>3,'name'=>'濉溪县','parent'=>5), array('id'=>4,'name'=>'昌平','parent'=&g 阅读全文
posted @ 2012-11-24 01:17 arvim 阅读(334) 评论(0) 推荐(0) 编辑
摘要: <?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it */ header("content-type:text/html;charset=utf-8"); echo "第一种方法<hr/>"; function mk_dir($path){ if(is_dir($path)){ return true; } if(is_dir(dirname($path))){ return mkdir($path); } mk_dir(dirname($path)); return mkdir( 阅读全文
posted @ 2012-11-23 01:14 arvim 阅读(295) 评论(0) 推荐(0) 编辑
摘要: <?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it */ function DelDir($path){ echo $path."</br>"; if(!is_dir($path)){ echo "填写正确的目录!"; return false; } $fh=opendir($path); while(($row=readdir($fh))!==false){//读取目录下的所有文件及文件夹 ... 阅读全文
posted @ 2012-11-23 00:29 arvim 阅读(279) 评论(0) 推荐(0) 编辑
摘要: <html><head><title>Json数据格式强大</title><meta http-equiv="content-type" content="text/html;charset=utf-8" /><script type="text/javascript"> var pepole={ "pragrammers":[ {"name":"效果","age":"6&q 阅读全文
posted @ 2012-11-15 12:05 arvim 阅读(731) 评论(0) 推荐(0) 编辑
摘要: <?php header("content-type:text/html;charset=utf-8"); class a{ public function call(){ echo "父类的".__CLASS__; } public static function say(){ self::call();//直接在父类中调用call方法 } public static function say1(){ static:: call();//延迟绑定到b的call方法 } } class b extends a{ public function ca 阅读全文
posted @ 2012-11-15 11:58 arvim 阅读(221) 评论(0) 推荐(0) 编辑
摘要: <?php/*燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it */ class Single{ static public $Instance=null;//用于保存一个类的对象 public $hash=null; final protected function __construct(){//final实现了不能重写,protected实现了不能new对象的功能 $this->hash = mt_rand(1,99999);//生成一个随机的数,用于判断是否是同一个对象 } static public function s... 阅读全文
posted @ 2012-11-13 23:55 arvim 阅读(160) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页