Difference between #6 and #7 of
The Comedy of Errors

Revision #7 has been created by Luke Jurgs on Jun 6, 2012, 8:26:08 AM with the memo:

Ending ?> tag in non-view
« previous (#6) next (#8) »

Changes

Title unchanged

The Comedy of Errors

Category unchanged

Others

Yii version unchanged

Tags unchanged

errors

Content changed

[...]
In the model rules() method put:

```php
array('foreingKey', 'exists', 'className' => 'SomeModel', 'attributeName' => 'id'),
```
Sure we have 'exists' method for CActiveRecord model, but ...

 
 
Ending ?> tag in non-view
 
---------------------------------
 
 
Extend a base class or edit a config file (needs to be included before the sessions starts) and leave a ?> at the ending with at least one trailing white space character. Make sure output buffering is off. Cry manly tears while trying to figure out why "Cannot modify header information - headers already sent" spams your log files.
19 0
15 followers
Viewed: 19 739 times
Version: 1.1
Category: Others
Written by: fsb
Last updated by: Mike
Created on: Dec 7, 2011
Last updated: 11 years ago
Update Article

Revisions

View all history