04 2014 档案

摘要:Kohana模板是个很好用的东西,他可以使你的界面统一化。而且便于资源管理。我建立了几个文件,他们的路径是其中 demo.php是模板控制器。代码如下:auto_render) { // Initialize empty values ... 阅读全文
posted @ 2014-04-30 18:18 UCanBeFree 阅读(515) 评论(0) 推荐(0) 编辑
摘要:function Complex(real,imageInaery){ this.r=real; this.i=imageInaery; } var com = new Complex(1,3); //javascipt类和对象... 阅读全文
posted @ 2014-04-29 11:22 UCanBeFree 阅读(150) 评论(0) 推荐(0) 编辑
摘要:这边我不要变。刷新好吗?请求数据 ajaxs基本用法。url="www.baidu.com?t="+Math.random();//避免缓存误导。var xmlhttp.open("GET",url,true);xmlhttp.send();ajax 提交POST数据 AJAX请求数据 阅读全文
posted @ 2014-04-29 10:53 UCanBeFree 阅读(446) 评论(0) 推荐(0) 编辑
摘要:第一步:创建仓库:sudo svnadmin create /var/www/vcontroller更改配置文件/var/www/vcontroller/conf下:svnserve.conf1,去# 去前面的空格:anon-access = readauth-access = writepassw... 阅读全文
posted @ 2014-04-26 11:53 UCanBeFree 阅读(160) 评论(0) 推荐(0) 编辑
摘要:ORM::将数据表对象化。最常用的四个字段:_db_group_belongs_to:和_has_many组合,可以实现表联接查询。(->with('modelalias'))_has_many_table_name插入:$posts=ORM::factory('Posts');$posts->us... 阅读全文
posted @ 2014-04-21 17:48 UCanBeFree 阅读(172) 评论(0) 推荐(0) 编辑
摘要:display: table-header-group; 能使 th td 对齐。使为 2高度的 表格合并var numTd=$('.table tr td:nth-child(9)');会定位到第九个表格 阅读全文
posted @ 2014-04-18 17:22 UCanBeFree 阅读(93) 评论(0) 推荐(0) 编辑
摘要:回调函数:让客户端自己决定返回值是什么。我想杀一个人用刀用枪如果用刀 比较费时间如果用枪 速度快但是要消耗子弹。让客户端自己选择//回调函数测试function knife(){echo "用刀了";}function gun(){echo "用枪了";}function call($pcall){... 阅读全文
posted @ 2014-04-18 15:00 UCanBeFree 阅读(147) 评论(0) 推荐(0) 编辑
摘要:Jquery是javascript一个比较好的用于前端界面编写的库。快捷方便。 默认直接调用。 --this当前doc对象 $("p.intro") 选取所有 class="intro" 的 <p> 元素。 $("p#demo") 选取所有 id="demo" 的 <p> 元素。 --jquery选 阅读全文
posted @ 2014-04-18 14:30 UCanBeFree 阅读(69) 评论(0) 推荐(0) 编辑
摘要:Request Flow将上面这些内从串联起来。在Kohana中,一个请求到来时,会按照下面的顺序执行:1,应用从index.php开始。首先设置application,module及system的路径,然后设置错误报告等级。如果Install文件存在则加载。最后执行APPPATH/booststr... 阅读全文
posted @ 2014-04-14 14:22 UCanBeFree 阅读(187) 评论(0) 推荐(0) 编辑
摘要:路由是Kohana中的难点之一:前面知道:Controller::rediect("welcome/index");会访问控制器 welcome的index函数其实它的原理就是 : 页面发出对控制器index函数的请求; 找到当前使用匹配的路由; 按路由规则找控制器,再找到对... 阅读全文
posted @ 2014-04-14 12:18 UCanBeFree 阅读(828) 评论(0) 推荐(0) 编辑
摘要:由于是英文手册,所有第一次把message和配置文件搞混淆了。与配置文件不同:1,提取方式不一样:config: $config=Kohana::$config->load('test'); echo $config->get('driver'); $hostnam... 阅读全文
posted @ 2014-04-14 11:10 UCanBeFree 阅读(294) 评论(0) 推荐(0) 编辑
摘要:Controller::redirect('welcome/index');由于kohana路径规则不一样 会导致所有的文件相对和绝对路径失效:如 -这条路径会直接定位到/controller/welcome/index/css/t.css与实际的路径./views/css/t.css不符合解决办... 阅读全文
posted @ 2014-04-14 10:11 UCanBeFree 阅读(216) 评论(0) 推荐(0) 编辑
摘要:什么是级联系统:cascade sysytem:待学习。class文件:在class下文件无论在那个子目录下面,kohana的级联系统都可以找到你的文件。目录位置的优先级:application>modules>system;config配置文件的编写和调用:php中配置文件一般由数组组成:如:/modules/Auth/config/auth.php(配置文件名要小写) 'File', 'hash_method' => 'sha256', 'hash_key' => NULL, 'lifetime 阅读全文
posted @ 2014-04-12 18:34 UCanBeFree 阅读(357) 评论(0) 推荐(0) 编辑
摘要:user.xml文件路径:"./model/user.xml"如何调用xml:1 header("Content-type: text/html; charset=utf-8"); 2 $str=simplexml_load_file("./model/user.xml");View Code像空文... 阅读全文
posted @ 2014-04-09 17:54 UCanBeFree 阅读(161) 评论(0) 推荐(0) 编辑
摘要://这句在php中可以用header("content-Type: text/html; charset=utf-8");set names gb2312;注意网页和数据库gbk2312的不一样的地方set name gb2312;往table插入中文发现 显示出来的是乱码。解决办法:在所有执行mysql_query函数做数据库插入删除查询之前 执行下面三个命令:mysql_query('set character_set_client = utf8');mysql_query('set character_set_connection = GBK& 阅读全文
posted @ 2014-04-08 14:47 UCanBeFree 阅读(139) 评论(0) 推荐(0) 编辑
摘要:看了很多文档还是一头雾水。mysql在4.1后就支持多语言。+--------------------------+----------------------------+| Variable_name | Value |+--------------------------+----------------------------+| character_set_client | utf8 || character_set_connection | utf8 ... 阅读全文
posted @ 2014-04-08 10:05 UCanBeFree 阅读(279) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示