yii, best way to call jquery, js and css files

Yii, Best pratice to include jquery, js and css files :

<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>


<?php Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl.'/css/style.css');?>


<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/star_rating.js');?>

1 comment

  1. 1/23- Nice tutorial. It is great to see someone publishing quality content on Yii. We have been working on an open source CRM application that is written in PHP utilizing JQuery, Yii, and RedBeanPHP and relies heavily on test driven development. It might be one of the most complex projects on Yii to date. Right now, we have 1000+ unit tests running across eight server configurations. We utilize selenium as well for a nice set of functional tests too. It would be incredibly helpful to get your technical feedback and recommendations so that we can improve the application. Take a look and let me know what you think: http://zurmo.org

Leave a comment

Your email address will not be published. Required fields are marked *