Showing 561-580 of 826 items.

1:n relations sometimes require CDbCriteria.together

Created 14 years ago by fsb fsb, updated 12 years ago by fsb fsb. 5 comments

There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

15 0
12
Viewed: 55 538 times
Version: 1.1
Category: Tips

How to write secure Yii1 applications

Created 14 years ago by François Gannaz François Gannaz, updated 5 years ago by François Gannaz François Gannaz. 22 comments
  • Validate the user input (see below for details).
  • Protect (escape) your application output according to context (see below for a few output types, mostly HTML and SQL).
  • Test your application in debug mode.
    Set the constant YII_DEBUG to true (by default, it is defined in index.php) and put alongside error_reporting(E_ALL);. Then errors and warnings will stop the execution an...
80 0
114
Viewed: 339 110 times
Version: 1.1
Category: How-tos

Yii Security-extended guide

Created 14 years ago by bingjie2680 bingjie2680, updated 14 years ago by bingjie2680 bingjie2680. 11 comments

This article is called extended guide is because there is already a security guide in the Yii tutorial security section. but that guide is not complete in the sense that it does not rise the developers' attention to some other commonly happening attacks: SQL injection and magic URL, which can be major vulnerabilities in you...

6 6
12
Viewed: 37 118 times
Version: 1.1
Category: Tips

How to re enable logging during unit testing

Created 14 years ago by Asgaroth Asgaroth, updated 14 years ago by Asgaroth Asgaroth. 3 comments

Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

11 0
10
Viewed: 28 953 times
Version: 1.1
Category: How-tos

How to learn Yii?!

Created 14 years ago by yJeroen yJeroen, updated 6 years ago by CeBe CeBe. 6 comments

Here is a step by step To-Do list for Yii beginners. The list is an advice of what tutorials and documentation you can walk through to get a full understanding of the Yii Framework. These can be a help to learn Yii.

17 0
21
Viewed: 131 329 times
Version: all
Category: Tutorials

TDD with PHPUnit_Story and Yii

Created 14 years ago by sidewinder sidewinder, updated 14 years ago by sidewinder sidewinder. 1 comment

Having said all of that, I want to add that the purpose of this article is not to convince anyone to write tests or design following TDD patterns. I'm not going to change the world to what I think is good. It's just about showing how to use some tools together with Yii Framework.