Windows

方式一:下载 DLL

    2.
    PECL

方式二:编译安装

搭建PHP编译环境

详见 php.net

安装依赖

1
cd PHP_BUILD_PATH/deps
2
3
DownloadFile http://zlib.net/zlib-1.2.11.tar.gz
4
5
7z x zlib-1.2.11.tar.gz > NUL
6
7z x zlib-1.2.11.tar > NUL
7
8
cd zlib-1.2.11
9
10
cmake -G "Visual Studio 14 2015" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_C_FLAGS_RELEASE="/MT"
11
cmake --build . --config "Release"
Copied!

编译扩展

1
cd PHP_PATH/ext
2
3
git clone https://github.com/viest/php-ext-excel-export.git
4
5
cd php-ext-excel-export
6
7
git submodule update --init
8
9
phpize
10
11
configure.bat --with-xlswriter --with-extra-libs=PATH\zlib-1.2.11\Release --with-extra-includes=PATH\zlib-1.2.11
12
13
nmake
Copied!
Last modified 1yr ago