PHPExcel integration into Zend Framework

前端 未结 6 751
忘了有多久
忘了有多久 2021-01-12 12:00

how can I integrate the PHPExcel into my Zend app.

My actual folder structure is the following:

/application
  controllers
  views  
  etc...
/librar         


        
6条回答
  •  粉色の甜心
    2021-01-12 12:22

    Place the PHPExcel library into the /library folder, like this:

    /application
    ...
    /library
        /PHPExcel
        /PHPExcel.php
    

    Next, in your application.ini config file, add the following:

    autoloaderNamespaces[] = "PHPExcel_"
    autoloaderNamespaces[] = "PHPExcel"
    

    That should do it. Autoloader takes care of the rest, and you can just start using the example code to read an Excel file.

    Update: Added the extra autoloaderNamespace as suggested by commenters

提交回复
热议问题