把framework\YiiBase.php中的第116行
* @return CApplication the application singleton, null if the singleton has not been created yet.
改成
* @return CWebApplication the application singleton, null if the singleton has not been created yet.
这样在写代码的时候Yii::app()->就多出了很多CWebApplicion的提示项(我用的是NetBeans),因为平时写CWebApplication多一些而几乎没有写CConsoleApplication,所以改这一点就没什么影响了。