Wiki

Sorted by viewsX
Displaying 101-110 of 771 result(s).

"Why do I get a 403 error when trying to use Gii?"

Created 5 years ago by Steve FriedlFAQs3 comments – viewed 58,092 times – ( +7 ) – version 1.1
After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error:
tags: Gii, config

How to display static pages in Yii?

Created 7 years ago by qiangTutorials2 comments – viewed 58,084 times – ( +19 ) – version 1.1
In a Web application, we often need to display pages like "about this site", "legal information", whose content are mostly static. There are several approaches to deal with this kind of pages.
tags: static pages

Yii 2 list of path aliases available with default basic and advanced app.

Created 2 years ago by Kartik VTips2 comments – viewed 57,251 times – ( +51 / -5 ) – version 2.0
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 4 years ago by c@cbaTutorials3 comments – viewed 56,764 times – ( +28 / -1 ) – version 1.1
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...

Yii and XAMPP server on Windows

Created 5 years ago by TrejderTutorials0 comments – viewed 56,657 times – ( +3 ) – version 1.1
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.
tags: windows, xampp, server

YiiBoilerplate - Setup a professional project structure in seconds

Created 3 years ago by Antonio RamirezOthers53 comments – viewed 56,404 times – ( +48 ) – version 1.1
YiiBoilerplate
tags: directory, config

X-Sendfile - serve large static files efficiently from web applications

Created 5 years ago by Maurizio Domba CerinHow-tos5 comments – viewed 55,849 times – ( +26 ) – version 1.1
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 3 years ago by yJeroenTutorials8 comments – viewed 55,278 times – ( +21 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Created 4 years ago by c@cbaTutorials37 comments – viewed 55,075 times – ( +32 ) – version 1.1
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen. Note that currently selected language is always a part of the URL, and thus available to the application through $_GET. You don't have to use sessions variables to keep track of the language if you don't want to.

Using Yii with Nginx and PHP-FPM

Created 5 years ago by LericHow-tos10 comments – viewed 54,997 times – ( +18 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.