I have a calls which help me display json directly in html table.
I have a calls which help me display json directly in html table.
If you are hosting Yii behind a reverse proxy, for example nginx, and you are having issues with your logs showing the proxies IP, or the urls being created arn't being created for SSL because your SSL certs are located on your reverse proxy instead of the Yii server, this code may be able to help you. I placed them in the very top of Yii's entry script, index.php
I recently worked on updating the content of a gridview based on the selection of a dropdown menu. I thought I should share it in the forum...
If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:
当我们使用Yii数据库去保存Session时,只要简单的配置就可以完成这个功能,在进行性能优化这个主题之前,我们先来查看一下CHttpSession和CDBHttpSession源代码,探讨CHttpSession和CDBHttpSession的流程再进行深一步优化主题。
The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test s...
You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.
There are several ways to speedup slow unit tests which interact with database:
This topic is related with langhandler extension
Using Rights generator component, we can easily create a dynamic menu, in which we scan every modules' controllers, to access the index page of them.
上一篇 关于 Yii CHttpSession性能优化篇之源码流程分析 有详细分析CHttpSession执行流程,在了解CHttpSession的详细执行流程之后,我们就可以非常轻松的扩展Yii Session,来优化和符合自己的业务流程。
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way
在经过畅K网的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明.
Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.
The CMenu class provides some useful features for generating menus in your web application.
I faced many issues when hosted our company website on AppFog.