Friday 17 November 2017

php - Yii Custom Widget

itemprop="text">

I am trying to create a Yii widget
that will generate Google Charts
(http://code.google.com/apis/chart).



How do I
make a widget that writes code in both the html headers (where the javascript includes
and stuff will be), and in the html body?


class="post-text" itemprop="text">
class="normal">Answer



I found my
answer:



Yii::app()->clientScript->registerScriptFile()



and



Yii::app()->clientScript->registerScript()


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...