php 7.2 ZipArchive class not having setEncryptionName function

巧了我就是萌 提交于 2020-01-03 02:29:10

问题


Have upgraded my php version from 5.6 to 7.2 but i dont see new php functions like setEncryptionName for ZipArchive class. i confirm this by echoing get_class_methods('zipArchive'). Do i need to do anything else in order to use the new set of functions the newer php version provides? Please help.


回答1:


The ZipArchive class is part of the zip PECL extension for PHP

You will need version 1.14.0 is higher for the setEncryptionName() function

See changelog here: https://pecl.php.net/package/zip/1.14.0

The zip extension depends on libzip >= 1.2.0

NOTE: many Linux distributions ship an older version of libzip. You might be able to find a newer version here: https://libzip.org/packages/ Otherwise you will need to compile it yourself.



来源:https://stackoverflow.com/questions/52693230/php-7-2-ziparchive-class-not-having-setencryptionname-function

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!