config problem

Sep 23, 2011 at 12:00 AM

Hello,

I don´t understand how should I configure the php word, I am running the server in my personal computer in D:/appserv/www/testproject/

I am trying to run this test http://localhost/testproject/test.php and I am getting this error:

Fatal error: Call to undefined method PHPWord_Section_Text::setBold() in D:\AppServ\www\testproject\prueba.php on line 25


Can anybody help me please.

 

Thanks

Oct 22, 2011 at 11:55 PM

Here's what I did ... I copied PHPWord.php and its subfolder into the directory where I've pointed my include_path (set in php.ini).  I suppose you could also set your include path using set_include_path.  Then, change require_once '../PHPWord.php'; to require_once 'PHPWord.php';  Having PHPWord.php in your include path will enable test.php to find it.  It expects to find all the other code it needs in the directory that starts where it is located - so your test.php should now work.