According to the manual http://jp.php.net/manual/en/memcache.installation.php;
According to the manual http://jp.php.net/manual/en/memcache.installation.php;
In this tutorial, we describe how to implement multiple layouts for action views in an application. As an example, we assume that the pages in our application will use three different layouts:
There are two ways to run a cron job:
It is good when someone writes extensions for us but trust, sometimes we forget about other approaches that, if we know the library, we shouldn't forget.
If you want to add module based login to a site without using RBAC, please follow these guidelines.
As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.
Installing WAMP on XP was pretty easy; W7 is not so trivial. It's not difficult once you know, but it took me best part of a day to figure out and required gleaning various bits of information from around the web; this tutorial brings it all together in one place to (hopefully) make other peoples lives that bit easier. It does assume that you are reasonably happy configuring Apache, PHP, and MySQL...
This article explains issues about installing XAMPP server package (Lite version) on Windows OS and configuring it for serving webapps written in Yii. Please note, that XAMPP is available for many more platforms and systems. I write about Windows edition as it was the only one tested by me.
Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.
In this article you will find Yii framework extensions enabling you to add various charts/print out buttons etc. to your webapp.
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import()
instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:
// take the curr...
Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.
CMenu comes with a lot of great customization options built in but sometimes you need it to do more.
Add these lines in /config/main.php
'components'=>array(
.........
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=database1',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'itsasecret',
'charset' => 'utf8',
),
'db2'=>array(
'class' => 'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=databa...
The default behavior with radio button lists is ugly, and I figured out mostly how to style them a coupla different ways. I'll used the blog tutorial example (but with my own posting modes):
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
One can control the detail of a web application in the webroot/index.php
file by manipulating the values of YII_DEBUG
and YII_TRACE_LEVEL
, but these don't appear to be used by console applications. This is because although the base CApplication
class defines a displayError()
method that does consider these variable, CConsoleApplication
overrides it with a function that doesn't honor th...
In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.
Here is overloaded version of CActiveForm.labelEx that adds colon (:) at the end of text of label with respecting CHtml::$afterRequiredLabel and CHtml::$beforeRequiredLabel
Yii comes with a set of powerful classes for logging. If you have read the documentation about logging messages, you have noticed that we can actually decide which messages we wish to log. And this is exactly what we are going to do, using [CWebLogRoute](http://www.yiiframework.com/doc/api/1.1/CWebLog...
ChromePHP is a console logging extension for Google Chrome.