Include CSS,javascript file in Yii


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $baseUrl = Yii::app()->baseUrl;
  2. $cs = Yii::app()->getClientScript();
  3. $cs->registerScriptFile($baseUrl.'/js/yourscript.js');
  4. $cs->registerCssFile($baseUrl.'/css/yourcss.css');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.