php - How to access external library in magento? -


i have make file in magento root. below

foldername/pay.php

this files call api , work lib. when call through direct in browser url.

i want call within magento function.

pay.php have class , add file within magento module file , make object shows error of object reference.

what should do? please suggest me.

thanks in advance magento dev

put library @ [magento]/lib folder

for example library phpexcel have put in [magento]/lib/phpexcel

and include library in magento file before call.

$includepath = mage::getbasedir(). "/lib/phpexcel/classes"; set_include_path(get_include_path() . ps . $includepath);  

so have create object of phpexcel library access it

$objphpexcel = new phpexcel(); 

for reference download phpexcel export , check directory structure way access external library in magento.

it create object in [magento]\app\code\local\conlabz\mreport\controllers\adminhtml\exportcontroller.php

hope you


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -