How To Add Input Filter Extension In Yii Project

where i add input extention in a yii project?please help me?

i add extention in

------------------------------------------path

protected>>extensions>>CmsInput


config>>main.php

‘components’=>array(

      'input'=>array(   


        'class'         => 'CmsInput',  


        'cleanPost'     => true,  


        'cleanGet'      => true,   


    ))

i hava this error:

include(CmsInput.php): failed to open stream: No such file or directory

i read this wiki page

wiki

Path to extension is probably wrong, U should do something like:

‘components’=>array(

‘input’=>array(

   'class' => 'path.to.exteansiont.CmsInput', // example 'application.extensions.Smc.CmsInput'


   'cleanPost' => true, 


   'cleanGet' => true, 

))

1 Like

make sure first CmsInput correspond to a directory and second to file containing the class CmsInput


...

'class'=>'ext.CmsInput.CmsInput'

...

Thanks all .for your reply.

i add:

1- htmlpurifier.php to=> myproject>>protected>>config

2-CmsInput.php to=> myproject>>protected>>components

3-vendors to => myproject>>protected

note:vendors is a folder contain this folder->Codeigniter and this folder contain=>CI_Security.php

Good Luck.