Yii_Widget_how_to_use_施用

Yii_Widget_how_to_use_使用$classNameget_class($this)$classnew ReflectionClass($className)$path

Yii_Widget_how_to_use_使用

                $className=get_class($this); $class=new ReflectionClass($className); $path = dirname($class->getFileName()).DIRECTORY_SEPARATOR.'views';?
                3. 调用该Widget
                  <?php?$this->widget('BannerMagicWidget');??>??

                ?

                大部分来源:http://koda.iteye.com/blog/1134606,有改动和增加。

                ?