安装
Rar is currently available through PECL » https://pecl.php.net/package/rar.
Also you can use the PECL installer to install the Rar extension, using the following command: pecl -v install rar.
You can always download the tar.gz package and install Rar by hand:
示例 #1 Rar installation
gunzip rar-xxx.tgz tar -xvf rar-xxx.tar cd rar-xxx phpize ./configure && make && make install
Windows users will enable php_rar.dll inside of php.ini in order to use these functions. PECL 扩展的 DLL 当前不可用。参见 在 Windows 上构建章节。
+添加备注
用户贡献的备注 2 notes
ohcc at 163 dot com ¶
9 years ago
Windows users download php_rar.dll at http://pecl.php.net/package/rar
0. click the DLL link for Windows
1. download php_rar.dll for your php version
2. copy php_rar.dll to the "ext" folder
3. append the following directive to the [php] section of your working php.ini, you can search "extension=" and append it to the last extension directive.
extension=php_rar.dll
4. restart your web server and enjoy.
cristianbzdg at botosani dot ro ¶
14 years ago
After installing RAR 2.0.0 extension in PHP 5.3.3 on OpenSUSE 11.3 using pecl command line, i had to enable it by creating a file named
/etc/php5/conf.d/rar.ini
which contains this line
extension=rar.so