08 2015 档案

摘要:分布式版本控制gitwiddows上的git 百度git previewhttp://git-scm.com1.安装Git-1.9.5.preview20就选下面默认的两个use Git from the windows ....都不选 checkout as-is.....------------... 阅读全文
posted @ 2015-08-25 23:59 __Rain丶 阅读(201) 评论(0) 推荐(0)
摘要:一、 手册-》调试-》异常处理 在公共config.php 中加入: url访问错误的时候,就会自动去跟目录下的Public文件夹 下找404.html url错误事例:http://localhost/newsuning/index.php/Admidfdfdf //写入错误的模版 二、 当访问不 阅读全文
posted @ 2015-08-20 12:32 __Rain丶 阅读(758) 评论(0) 推荐(0)
摘要:1.几种方式public function getAjax(){ //$data = 'ok'; //$this->ajaxReturn($data); // 'ok' //$this->ajaxReturn(['aaa'=>'bb... 阅读全文
posted @ 2015-08-18 23:23 __Rain丶 阅读(171) 评论(0) 推荐(0)
摘要:连接上一个 无限分类一、新建一个商品表cid对应上面的ID二、//获取所有的数据$pdo = new PDO("mysql:host=localhost;dbname=lamp108",'root','');$pdo->query("set names gbk");$stmt = $pdo->que... 阅读全文
posted @ 2015-08-18 00:24 __Rain丶 阅读(191) 评论(0) 推荐(0)
摘要:一、数据库他的pid是上级的id二、php//获取所有的数据$pdo = new PDO("mysql:host=localhost;dbname=lamp108",'root','');$pdo->query("SET NAMES GBK");$stmt = $pdo->query("select... 阅读全文
posted @ 2015-08-17 22:42 __Rain丶 阅读(266) 评论(0) 推荐(0)
摘要:document.write('Hello World'); //写入网页alert('Hello World');console.log('Hello World'); //写入控制台---------------------------------------------------------... 阅读全文
posted @ 2015-08-15 22:57 __Rain丶 阅读(315) 评论(0) 推荐(0)
摘要:$ch = curl_init ("http://www.suning.com/");curl_setopt ($ch,CURLOPT_RETURNTRANSFER , true );$con=curl_exec($ch);$str = '//U'; //\w匹配httppreg_match_... 阅读全文
posted @ 2015-08-14 19:48 __Rain丶 阅读(1656) 评论(0) 推荐(0)
摘要:view中 add.html 二、 控制器中写 view send.html 三、其他 手册的方法 //调用这个方法 public function send(){ $data = 'ok'; //浏览器返回 "ok" $data = ['abcd'=>'abcd',"name"=>'zhangsa 阅读全文
posted @ 2015-08-14 00:49 __Rain丶 阅读(853) 评论(0) 推荐(0)
摘要:一、生成验证码 1、commonController.class.php class CommonController extends Controller{ public function getVerify(){ $Verify = new \Think\Verify(); $Ve... 阅读全文
posted @ 2015-08-12 11:33 __Rain丶 阅读(383) 评论(0) 推荐(0)
摘要://更新 更新中的话,一定要写那一个if判断 public function update(){ $model = M('link'); $upload = new \Think\Upload();// 实例化上传类 ... 阅读全文
posted @ 2015-08-12 02:21 __Rain丶 阅读(1607) 评论(0) 推荐(0)
摘要:loginpro1、建立控制器 loginController.calss.phpdisplay('login'); } public function login(){ $username = I("post.username"); ... 阅读全文
posted @ 2015-08-11 23:18 __Rain丶 阅读(700) 评论(0) 推荐(0)
摘要:1.在admin-》view下建立public文件夹2.在public文件夹下建立error.html success.html3.在项目下公共common -》config.php写入配置true, 'DB_TYPE' => 'mysql', // 数据库类型 'DB_HOST' => '127.... 阅读全文
posted @ 2015-08-07 23:31 __Rain丶 阅读(1353) 评论(0) 推荐(0)
摘要://用户状态 IF语句禁用正常使用 //IDE格式化代码Alt+Shift+F//I方法 使用I函数进行变量获取和过滤。I('变量类型.变量名',['默认值'],['过滤方法'],['额外数据源'])注意:变量类型不区分大小写。变量名则严格区分大小写。默认值和过滤方法均属于可选参数。①我们以GET变... 阅读全文
posted @ 2015-08-07 16:58 __Rain丶 阅读(483) 评论(0) 推荐(0)
摘要://1 1 2 3 5 8 13 ....//观察数列 你会发现下一个数是如何得来的 // f(3) = f(2) + f(1) f(4)=f(3)+f(2) f(18)=f(17)+f(16)// 2 = 1 + 1 3 = 2 + 1 ... 阅读全文
posted @ 2015-08-07 16:48 __Rain丶 阅读(901) 评论(0) 推荐(0)
摘要:1.在控制器里面实例化 数据表的时候用D方法,不要用M方法2.在当前Admin下的Model里面建立一个自定义的ModelAdminsController.class.php=================== public function update(){ $model = D... 阅读全文
posted @ 2015-08-07 13:00 __Rain丶 阅读(1258) 评论(0) 推荐(0)
摘要:封装日期为date.js 加入前导0========================date.js//前导0function addZero(n){ if(n//引入js//代码的实现 阅读全文
posted @ 2015-08-05 11:59 __Rain丶 阅读(180) 评论(0) 推荐(0)