[HELP]CakePHP addImage not working

Oct 10, 2012 at 4:09 AM
Edited Oct 10, 2012 at 5:19 AM

I'm working with cakephp and i am using this phpword to generate a dynamic document but i have a problem with the addImage function. I can't successfully add an image to the document.

 

here is what my directory look like :

project_name/

 ..........................app/

 .......................................vendors/phpdocx -> phpword source file

 ........................................views/events/documents/word_template.ctp -> this contains the code and layout    of my generated document

.......................................webroot/img/image.png -> the image i would like to add

 

everytime i call this addImage() function the image doesn't insert on the document

a always got an error with this one

 

PHPWord_Section::addImage() - APP\vendors\phpword\PHPWord\Section.php, line 245

and it says that : 

Source does not exist or unsupported image type. [APP\vendors\phpword\PHPWord\Section.php, line 245]

i really need help on this one. 

Thanks! 

Nov 15, 2012 at 8:31 AM

I just figure out what is wrong.. i forgot to use the WWW_ROOT not it works fine...