php - Yii, importing library does not work -


i'm trying implement identicon library site error class not found.

i tried yii::import('application.vendor.*'); put library in vendor folder, not work.

i tried adding library component controller still gives me error.

and tried making import in view code be

<?php     yii::import('application.vendor.*');     $identicon = new identicon;      $identicon->displayimage('test'); ?> 

and yet tells me error class not found. copied src folder zip vendors , components. how can import library?

if folder structure like

-- root -- protected       |---- vendors             |---- myfolder                      |---- myclass.php 

you can import this

 yii::import('appplication.vendors.myfolder.myclass'); 

since yiis auto load based on file name, if class identicon defined in myclass wont loaded because has different file name, in case have go with:

 yii::import('appplication.vendors.myfolder.*' , true); 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -