C2.sun 2012-05-31 00:09:12 7025次浏览 3条回复 0 0 0

请教:本人新手在做按照yii提供的blog文档编写blog实例时遇到这个问题,希望有那么大哥帮忙解答

属性 "Post.tagLinks" 未被定义.

E:\eclipse\workspace\blog\yii\framework\db\ar\CActiveRecord.php(144)

132      */
133     public function __get($name)
134     {
135         if(isset($this->_attributes[$name]))
136             return $this->_attributes[$name];
137         else if(isset($this->getMetaData()->columns[$name]))
138             return null;
139         else if(isset($this->_related[$name]))
140             return $this->_related[$name];
141         else if(isset($this->getMetaData()->relations[$name]))
142             return $this->getRelated($name);
143         else
144             return parent::__get($name);
145     }
146 
147     /**
148      * PHP setter magic method.
149      * This method is overridden so that AR attributes can be accessed like properties.
150      * @param string $name property name
151      * @param mixed $value property value
152      */
153     public function __set($name,$value)
154     {
155         if($this->setAttribute($name,$value)===false)
156         {
您需要登录后才可以回复。登录 | 立即注册