摘要: step1.install phpunit composer.json require中增加"phpunit/phpunit":"4.0.*" 执行1 composer update phpunit将被安装在vender/bin/目录下vendor/bin/phpunit 便执行所有单元测... 阅读全文
posted @ 2015-03-19 16:25 zaric 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 1. routing2. Ioc3. Facade4. Artisan1.routing参考:http://laravel.com/docs/4.2/routing了解routing之前先了解下laravel的处理过程request lifecycle发送给应用程序的所有请求都经由public/in... 阅读全文
posted @ 2015-03-19 09:37 zaric 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 请求进入public/index.php文件。bootstrap/start.php文件创建应用程序对象并检测环境。内部的framework/start.php文件配置相关设置并加载服务提供器。加载应用程序app/start目录下的文件。加载应用程序的app/routes.php文件。将 Reque... 阅读全文
posted @ 2015-03-16 17:30 zaric 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 详细信息 个人资料 {{user.model.username}} ... 阅读全文
posted @ 2015-03-09 10:03 zaric 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 首先配置下nginx,确保可以不使用index.php来访问server{ listen 8082; server_name yii2.dev; access_log logs/yii2.access.log; error_log logs/yii2.error.l... 阅读全文
posted @ 2014-10-17 13:45 zaric 阅读(500) 评论(0) 推荐(0) 编辑
摘要: namespace和目录对应,否则无法找到控制器类,module文件在根路径使用gii生成Module为\app\admin,那么namespace app;class admin extends \yii\base\Module{ public $controllerNamespace = ... 阅读全文
posted @ 2014-10-16 20:10 zaric 阅读(1219) 评论(0) 推荐(0) 编辑
摘要: In Linux,a network of each typeis created when running vmware-config.pl.In Windows, they are automatically created. If you didn't create them the firs... 阅读全文
posted @ 2014-05-23 09:23 zaric 阅读(223) 评论(0) 推荐(0) 编辑
摘要: findAll(); $list = CHtml::listData($records, 'id', 'username'); echo CHtml::dropDownList('names', null, $list, array('empty' => '(Select a name)'));?> 阅读全文
posted @ 2013-12-18 09:05 zaric 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Classic technique (escape metacharacters):if[ \( $g -eq 1-a "$c"="123" \) -o \( $g -eq 2-a "$c"="456" \) ]then echo abcelse echo efgfiI tried various tricks with '[[ ... ]]' without success - even escaping the parentheses did not seem to work.Isn't 阅读全文
posted @ 2013-11-07 15:53 zaric 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 特殊的shell变量:$0 获取当前执行的shell脚本的文件名$n 获取当前执行的shell脚本的第n个参数值,n=1..9$* 获取当前shell的所有参数 “$1 $2 $3 …注意与$#的区别$# 获取当前shell命令行中参数的总个数$$ 获取当前shell的进程号(PID)$! 执行上一个指令的PID$? 获取执行的上一个指令的返回值(0 为成功, 非零为失败)$@ 这个程序的所有参数 “$1″ “$2″ “$3″ “…”举例(通过脚本举例,大家也可以一行行执行测试):[ryan@etiantian test]# cat etiantian.shecho ‘$0 ... 阅读全文
posted @ 2013-11-07 15:52 zaric 阅读(208) 评论(0) 推荐(0) 编辑