摘要: 一、数据库他的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丶 阅读(255) 评论(0) 推荐(0) 编辑
摘要: document.write('Hello World'); //写入网页alert('Hello World');console.log('Hello World'); //写入控制台---------------------------------------------------------... 阅读全文
posted @ 2015-08-15 22:57 __Rain丶 阅读(302) 评论(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丶 阅读(1616) 评论(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丶 阅读(844) 评论(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丶 阅读(350) 评论(0) 推荐(0) 编辑
摘要: //更新 更新中的话,一定要写那一个if判断 public function update(){ $model = M('link'); $upload = new \Think\Upload();// 实例化上传类 ... 阅读全文
posted @ 2015-08-12 02:21 __Rain丶 阅读(1577) 评论(0) 推荐(0) 编辑
摘要: loginpro1、建立控制器 loginController.calss.phpdisplay('login'); } public function login(){ $username = I("post.username"); ... 阅读全文
posted @ 2015-08-11 23:18 __Rain丶 阅读(660) 评论(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丶 阅读(1334) 评论(0) 推荐(0) 编辑
摘要: //用户状态 IF语句禁用正常使用 //IDE格式化代码Alt+Shift+F//I方法 使用I函数进行变量获取和过滤。I('变量类型.变量名',['默认值'],['过滤方法'],['额外数据源'])注意:变量类型不区分大小写。变量名则严格区分大小写。默认值和过滤方法均属于可选参数。①我们以GET变... 阅读全文
posted @ 2015-08-07 16:58 __Rain丶 阅读(473) 评论(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丶 阅读(882) 评论(0) 推荐(0) 编辑