Forum


Replies: 1   Views: 156
Fatal error: cannot redeclare class autoloader

Posted by webdevlamp  · 11-01-2017 - 09:09

Hi,

I have been trying to integrate phpdocx with my current application, but facing issue while trying to include class file from phpdocx.

require_once('path_to_phpdocx/classes/CreateDocx.inc');

Just to let you know that my application, we have already used autoloader to load various classes from defined location.

Also i tried to run the example code outside of my application as test project, and it worked properly and generate docx file successfully.

Can anyone please help me to fix this issue, which is kind of roadblock for me at the moment.

Thanks.

Posted by admin  · 11-01-2017 - 09:41

Hello,

To avoid duplicated classes names, we recommend you to use the phpdocx namespaces package available in Advanced and Premium licenses.

Regards.