承接 do-php/php_excel_dev 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

do-php/php_excel_dev

最新稳定版本:1.1.0

Composer 安装命令:

composer require do-php/php_excel_dev

包简介

LibXL - php_excel development stubs

README 文档

README

PHP 7.1+ Build Status Total Downloads License

Installation tips, stubs and checker for LibXL / iliaal/php_excel php extension.

Stubs

Useful to enable autocompletion in your project composer require soluble/php_excel_dev --dev

Stubs should be installed as a --dev dependency.

LibXL install

In order to compile the iliaal/php_excel you must have libXL installed and the php development packages installed (phpize, phpconfig).

On Ubuntu, ensure you have the php-dev package installed.

sudo apt-get install php-dev

Alternatively suffix with the php version if you're using the ondrej/php ppa:

sudo apt-get install php7.3-dev

Automated installation scripts

You can either use one of the bash scripts below :

PHP Distribution Gist
7.3 Ubuntu ondrej/php ppa install_phpexcel_php73.sh
7.2 Ubuntu ondrej/php ppa install_phpexcel_php72.sh
7.1 Ubuntu ondrej/php ppa install_phpexcel_php71.sh
7.x For Travis CI travis-install-libxl.sh

Be sure the extension is loaded (in your php.ini) or type phpenmod excel.

Manual installation

LibXL

The libxl static binaries can easily be installed:

sudo mkdir /opt/libxl-3.8.2;
wget -qO- http://www.libxl.com/download/libxl-lin-3.8.2.tar.gz | sudo tar zxvf - --strip 1 --directory /opt/libxl-3.8.2

PHP extension

Download and unzip the php_excel/php7 branch:

wget -qO- https://github.com/iliaal/php_excel/archive/php7.tar.gz | tar zxvf - --directory /tmp

Build the extension;

cd /tmp/php_excel-php7; 
./configure --with-php-config=`which php-config` \
            --with-libxl-incdir=/opt/libxl-3.8.2/include_c/ \
            --with-libxl-libdir=/opt/libxl-3.8.2/lib64/ \
            --with-excel=/opt/libxl-3.8.2 && \
make && \
make install

In case you're using multiple php versions, you can generally suffix the phpize and phpconfig commands like phpize-7.3, php-config-7.3...

Then register the extension in your php.ini:

extension=excel.so

For ondrej/php ppa

echo "extension=excel.so" > /tmp/excel.ini;
sudo cp /tmp/excel.ini /etc/php/php7.3/mods-available/excel.ini; 
sudo phpenmod -v 7.3 excel;

Checks

A convenience script to check installation can be run from composer

$ composer check:libxl -- <license name> <license key>

or directly from php

$ ./bin/check_phpexcel_install.sh <license name> <license key> 

It checks for correctly loaded extension and valid license.

Versions

Version LibXL php_excel Note(s)
0.1.x 3.8.2 php7-branch > 3.8.2 seems to have license problem

统计信息

  • 总下载量: 4.85k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-10