摘要: 包含文件 use think\Db; public function index3() { $result=Db::execute('insert into ceshi (name,paw)VALUE ("李四","234")');//添加数据 print_r($result); $result=Db::execute('update ... 阅读全文
posted @ 2017-08-03 14:54 安晓宇 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: 包含文件use think\Request; public function index1() { $request = Request::instance(); echo $request->url();//获取当前URL地址,不包含域名 echo $this->request->url();//获取当前URL地址,不包含域名 ... 阅读全文
posted @ 2017-08-01 19:22 安晓宇 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 简介 简介 ThinkPHP是一个免费开源的,快速、简单的面向对象的轻量级PHP开发框架,引入了全新的CBD(核心+行为+驱动)架构模式,同时支持SAE、REST和Mongo 目录结构 调用试图 阅读全文
posted @ 2017-07-29 01:11 安晓宇 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 各种选择器使用 a) 基本选择器 $(“#id”) $(“tag标签”) $(“.class”) $(“*”) $(“s1,s2,s3...”) b) 层次选择器 $(s1 s2) $(s1 > s2) $(s1 + s2) $(s1 ~ s2) c) 并且(过滤)选择器 :first :last 阅读全文
posted @ 2017-07-29 00:35 安晓宇 阅读(149) 评论(0) 推荐(0) 编辑
摘要: id和class没有本质上的区别,很多时候可以混用(XHTML不允许,但是也不会报错)。但符合web标准的页面必须结构良好,有语义,有可读性,所以为了养成良好的代码编写习惯,建议读者严格区分。同样的id名称在页面中只使用一次,可用于页面的布局等应用。同样的class名称可以在页面多次使用,作用于多个 阅读全文
posted @ 2017-05-21 22:41 安晓宇 阅读(290) 评论(0) 推荐(1) 编辑
摘要: <?phpif(isset($_GET["n"])){ $g=$_GET["n"];}else{ $g=3;}function hf($n){ $a = $n; $x1 = 0; $y1 = ($a - 1) / 2; $arr[$x1][$y1] = 1; for ($i = 2; $i <= $ 阅读全文
posted @ 2017-05-21 22:16 安晓宇 阅读(147) 评论(0) 推荐(0) 编辑
摘要: <?php$c=0; for($i11=1;$i11<=9;$i11++) { $i1=$i11; for($i22=1;$i22<=9;$i22++) { $i2=$i22; if($i2==$i1){continue;} for($i33=1;$i33<=9;$i33++) { $i3=$i33 阅读全文
posted @ 2017-05-21 22:15 安晓宇 阅读(902) 评论(0) 推荐(0) 编辑
摘要: //登陆页面 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>用户登陆</title></head><body><!-- 用户登陆界面--><form action="denglyz.php" method="p 阅读全文
posted @ 2017-05-21 22:14 安晓宇 阅读(270) 评论(0) 推荐(0) 编辑
摘要: <?php 递推由小推大 递归由大推小 注意:递推比递推效率高很多 //0、1、1、2、3、5、8、13、……求和//递归思想求第n项的值function qiuhe($n){ if($n==1){ return 0; }else if($n==2){ return 1; }else{ return 阅读全文
posted @ 2017-05-21 22:13 安晓宇 阅读(1061) 评论(0) 推荐(0) 编辑
摘要: 整数进制转换 dec:十进制。就是普通看到的数字 bin:二进制。由0和1组成的数字 oct:八进制。定义时要0开头的0-7组成的数字 hex:十六进制。定义时要0x开头的0-9和a-f组成的数字 $n=decbin(十进制数):十进制转二进制,除2最后商的结果加上取余倒着写 $n=decoct(十 阅读全文
posted @ 2017-05-21 22:12 安晓宇 阅读(293) 评论(0) 推荐(0) 编辑