讲runtime 这个文件夹添加权限 chmod o+w runtime…
CHtml类参考: http://www.yiichina.com/api/CHtml#activeDropDownList-detail activeDropDownList() 方法 public static string activeDropDownList(CModel $model, string $attribute, array $data, array $htmlOptions=array ( )) $model CModel 数据模型 $attribute string 属性…
//命名空间 use app\components\HttpException; model废除方法relations(),scopes() Yii::app() 修改成 Yii::$app $this->render('/' . $this->id, array('orders' => $orderSearch)) 修改成 return $this->render('/' . $this->id, array('orders' => $orderSearch)) th…
This topic provides step-by-step instructions on how to use the XPO Data Model Designer in XAF applications. We will create a simple business model consisting of two objects - Employee and Task. These objects will be linked with a one-to-many relatio…
前言,此方法利用反射将DataRow转成实体,由于反射性能不行,大家就看看就行了吧. 代码来啦 using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Reflection; using System.Text; namespace WangSql.DBUtility { public class DataMapHelper { private enum…
异常无处不在,作为程序员,活着就是为了创造这些异常,然后修复这些异常而存在的.YII框架封装了PHP的异常,让异常处理起来更简单. 使用 YII处理错误和异常的配置方法: 你可以在入口文件中定义YII_ENABLE_ERROR_HANDLER和YII_ENABLE_EXCEPTION_HANDLER为true. 引发异常的情况 1.触发onError或者onException事件 2.人为抛出异常.例如 throw new ExceptionClass('错误信息');//异常的基类 throw…
Model类 基本概念 在model/view构架中,model为view和delegates使用数据提供了标准接口.在Qt中,标准接口QAbstractItemModel类中被定义.不管数据在底层以何种数据结构存储,QAabstractItemModel的子类会以层次结构的形式来表示数据,结构中包含了数据项表.我们按这种约定来访问model中的数据项,但这个约定不会对如何显示这些数据有任何限制.数据发生改变时,model通过信号槽机制来通知关联的views. Model Indexes 为了使…
Yii:t()的动态配置 \Yii::$app->i18n->translations['categoryName*'] = [ 'class' => 'yii\i18n\PhpMessageSource', 'sourceLanguage' => 'zh-CN', 'basePath' => '@categoryName/messages', ]; `…
yii提供了强大的命令行工具来快速的创建相关组件和应用.下面就来讲解用yiic工具快速创建yii应用我的web目录在 d:\www下 yiiframework在 D:\www\yii\frameworkwin平台  cd 进入 www\yii\framework 目录  运行cmd命令 C:\Users\******>d:  *[切换到D盘] D:\>cd www\yii\framework D:\www\yii\framework>yiic webapp ../testapp/  *创…
FastAdmin 在线命令生成时出错的分析 出错现象 版本环境 FastAdmin 版本:1.0.0.20180806_beta 在线命令插件版本:1.0.3 分析 2018-08-13 16:12 查看了 command.js 的源码,当点下执行时是通过 Fast.api.ajax 提交到 command/command/action/execute 进行执行的,但是不知道为什么,错误的信息是从 command/command/add 返回的. $(document).on('click',…