Giter Club home page Giter Club logo

Comments (10)

viest avatar viest commented on May 29, 2024

configure 输出可以贴一下吗?

from php-ext-xlswriter.

vioulo avatar vioulo commented on May 29, 2024

configure 输出可以贴一下吗?

phpize and ./configure --with-php-config=/usr/bin/php-config7.2
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024

configure 会有很长的一段检查输出,麻烦请贴一下

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024

如果不方便的话,你还可以使用 PECL 进行安装

pecl install xlswriter

from php-ext-xlswriter.

vioulo avatar vioulo commented on May 29, 2024

configure 会有很长的一段检查输出,麻烦请贴一下

phpize && ./configure --with-php-config=/path/to/php-config 当时运行这块时候,确实输出了很长的字符:
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure: error: Cannot find php-config. Please use --with-php-config=PATH
然后我就改成了 phpize and ./configure --with-php-config=/usr/bin/php-config7.2
那我试试 pecl

from php-ext-xlswriter.

vioulo avatar vioulo commented on May 29, 2024

使用 pecl install xlswriter 输出了以下的内容,应该是成功了!
Build process completed successfully
Installing '/usr/lib/php/20170718/xlswriter.so'
install ok: channel://pecl.php.net/xlswriter-1.2.3
configuration option "php_ini" is not set to php.ini location
You should add "extension=xlswriter.so" to php.ini
@viest 使用 pecl 是不是就不需要下载这个包了?:sweat_smile:

from php-ext-xlswriter.

vioulo avatar vioulo commented on May 29, 2024

有一个新的问题 😂 我使用示例
$config = ['path' => storage_path('excel')];
$excel = new \Vtiful\Kernel\Excel($config);
$filePath = $excel->fileName('tutorial01.xlsx', 'sheet1')
->header(['Item', 'Cost'])
->data([
['Rent', 1000],
['Gas', 100],
['Food', 300],
['Gym', 50],
])
->output();
看起来都正常,我打印出 $filePath 的值是 "/var/www/project/storage/excel/tutorial01.xlsx",但是当前文件夹没有这个文件,这个目录权限是 777,麻烦指点下 😭 ~

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024

你可以看下 excel 这个目录是否存在,目前这个版本扩展并不会主动创建目录,后期会考虑加上

from php-ext-xlswriter.

vioulo avatar vioulo commented on May 29, 2024

你可以看下 excel 这个目录是否存在,目前这个版本扩展并不会主动创建目录,后期会考虑加上

😹 是的,我刚创建了目录,然后运行了下,成功生成了文件!感谢你的回复 🌟

from php-ext-xlswriter.

viest avatar viest commented on May 29, 2024

很高兴可以帮到你!

from php-ext-xlswriter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.