Require command in Yii PHP -


i'm using yii framework web development.

i'm trying make email cron job, i'm using phpmailer.

here's config/console.php

> return array( >     'basepath'=>dirname(__file__).directory_separator.'..', >     'name'=>'my console application', >  >     // preloading 'log' component >     'preload'=>array('log'), >     'import'=>array( >             'application.modules.*', >             'application.extensions.*', >             'application.components.*', >             'application.models.*', >         ), .... 

my command/testcommand.php

class uptimecheckercommand extends cconsolecommand{     public function run($args) {  ....  $warning->send();  .... 

my component/warning.php

.... require("/protected/extensions/phpmailer/class.phpmailer.php"); .... 

error report:

php error[2]: require(/protected/extensions/phpmailer/class.phpmailer.php): fail ed open stream: no such file or directory 

i'm testing using controller component , works fine. error happens when i'm trying access using yiic test command.

any appreciated

'import'=>array(    ...    'application.extensions.phpmailer.*',    ... ) 

and rename file class.phpmailer.php phpmailer.php

importing directory not import of subdirectories.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -