摘要: 1、在控制台中切换到yii2控制台入口文件的工作路径。如:C:\users\2016-01>D:www\blogdemo\yii 阅读全文
posted @ 2017-05-09 08:38 pengcx 阅读(670) 评论(0) 推荐(0) 编辑
摘要: use yii\caching\Cache;$cache = Yii::$app->cache;$cache['var1'] = $value1; // equivalent to: $cache->set('var1', $value1);$value2 = $cache['var2']; //  阅读全文
posted @ 2017-05-02 13:27 pengcx 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1、下载模板 2、环境变量配置 a.右击我的电脑-属性-高级-环境变量 b.找到 Path 这一项,鼠标双击 Path 这一项,在最后加入你的 PHP 目录和类库所在的路径,包括前面的“;”(例如:;C:\php;) c.点击“新建”按钮并在“变量名”中输入“PHPRC”,在“变量值”中输入 php 阅读全文
posted @ 2017-04-27 09:09 pengcx 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 2、请求方法 3、请求URL request 组件提供了许多方式来检测当前请求的URL。 假设被请求的URL是 http://example.com/admin/index.php/product?id=100, 你可以像下面描述的那样获取URL的各个部分: yii\web\Request::url 阅读全文
posted @ 2017-04-20 16:27 pengcx 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 1、C 在设计良好的应用中,控制器很精练,包含的操作代码简短; 如果你的控制器很复杂,通常意味着需要重构,转移一些代码到其他类中。 归纳起来,控制器 可访问 请求 数据; 可根据请求数据调用 模型 的方法和其他服务组件; 可使用 视图 构造响应; 不应处理应被模型处理的请求数据; 应避免嵌入HTML 阅读全文
posted @ 2017-04-20 11:17 pengcx 阅读(876) 评论(0) 推荐(0) 编辑
摘要: 1、相加 string bcadd(string left operand, string right operand, int [scale]); 2、相减 string bcsub(string left operand, string right operand, int [scale]); 阅读全文
posted @ 2017-04-17 09:48 pengcx 阅读(2925) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/BornThisWay/p/BornThisWay.html 阅读全文
posted @ 2017-04-13 17:50 pengcx 阅读(87) 评论(0) 推荐(0) 编辑
摘要: http://www.nowamagic.net/academy/detail/12220245 阅读全文
posted @ 2017-04-10 16:03 pengcx 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1、<a href="JavaScript:void(0);" class="bs-tooltip remark-item" rel="{$bill.id},{$bill.username},{$bill.remark}"><i class="icon-pencil"></i>备注</a>2、<!- 阅读全文
posted @ 2017-03-29 11:30 pengcx 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 1、// 定义应用目录 define('APP_PATH', __DIR__ . '/../application/'); // 加载框架引导文件 require __DIR__ . '/../thinkphp/start.php'; // 读取自动生成定义文件 $build = include ' 阅读全文
posted @ 2017-03-08 10:30 pengcx 阅读(4535) 评论(0) 推荐(0) 编辑