related functions, so need to help third-party functions to use
Fortunately there is this PECL (the PHP Extension Community Library)
There is a RAR package can be used
But it has to be installed manually.
If Unix, you can refer to the following installation method
Fetch HTTP://PECL.PHP.NET/GET/RAR-X.X.X.TGZ
Gunzip rar-xxx.tgz
TAR-XVF Rar-xxx.tar
CD rar-xxx
Phpize
./configure make make install
Of course, if FreeBSD, it would be quicker to use port.
Cd/usr/ports/archivers/pecl-rar
Make
Make
2011-04-01 17:58:52| Category: Android | Report | Font size Subscription How does the unzip function of the zip file be implemented in the Android platform? Because Android has integrated the Zlib library, for the English and non-password zip file decompression is relatively simple, the following Android123 to everyone a zip
Copy Code code as follows:
/**********************
* @file-path to zip file
* @destination-destination directory for unzipped files
*/
function Unzip_file ($file, $destination) {
Create Object
$zip = new Ziparchive ();
Open Archive
if ($zip->open ($file)!== TRUE
In specific Web site programming projects, sometimes you need to use PHP script code to control the compression and decompression zip file. The following is a simple PHP zip decompression implementation code, the need for friends can refer to the next careful study of a bit.
After PHP installation comes with a
ZipCode
if (Document.regform.u_zipcode.value = = "") {
Alert ("Hint: You must enter a ZIP code!") ");
Document.regform.u_zipcode.focus ();
return false;
}
if (document.regform.u_zipcode.value.length!=6) {
Alert ("Hint: Zip length not correct!") ");
Document.regform.u_zipcode.focus ();
return false;
}
bstring = "0123456789";
for (i = 0;
The CodeIgniter framework of the compression decoding class, where the Read_dir method allows you to compress a server somewhere in the presence of a folder (and the files and subfolders inside it).
Provide a folder path, the Zip class will read it recursively and re-create the add to archive. All files under the path you provide will be compressed, including all subfolders.
For example:
$path = '/path/to/your/directory/'; $this->
pathName) {ZipFile = new File (pathName);}
public void Compress (String srcpathname) { File srcdir = new file (srcpathname); if (!srcdir.exists ()) Throw The new RuntimeException (Srcpathname + "does not exist.) "); Project PRJ = new Project (); Zip zip = new zip (); Zip.setproject (PRJ); Zip.setdestfile (ZipFile); Fileset fileset = new Fileset (); Fil
Php obtains all the information (such as the address, postal code, country, and latitude and longitude) of the specified IP address. Php obtains all the information (such as address, zip code, country, and latitude and longitude) of a specified (guest) IP address. This document describes how to obtain the specified IP address (visitor) by using php) all IP inform
This function uses regular expressions to determine whether it is a valid zip code (fixed length.
The Code is as follows:
Copy code
// Function name: CheckPost ($ C_post)// Usage: Determine whether the zip code
Zip:pclzip http://www.phpconcept.net/pclzip/index.en.php
rar:pecl rar Http://pecl.php.net/package/rar
In the past to perform the decompressor under PHP, the most common way is to write command and then use EXEC () and other execution functions to run
This may be possible under Windows, but switching to UNIX can be a problem for account permissions and cannot be executed successfully
Is there a way of providing a function that can be used directly without having to go to the command to run?
The a
The problem was discovered by chance when this compilation was published in the previous period:
Zip error:invalid Command Arguments (cannot repeat names in zip file) Make: * * * [out/target/product/k200_hdmiin/system/etc /recovery-resource.dat] Error 16make: * * * waiting for unfinished jobs ....
Background Introduction
Bo Master is currently engaged in Androidtvbox development, based on Androi
functions to use
Fortunately there is this PECL (the PHP Extension Community Library)
There is a RAR package can be used
But it has to be installed manually.
If Unix, you can refer to the following installation method
Fetch HTTP://PECL.PHP.NET/GET/RAR-X.X.X.TGZ
Gunzip rar-xxx.tgz
TAR-XVF Rar-xxx.tar
CD rar-xxx
Phpize
./configure make make install
Of course, if FreeBSD, it would be quicker to use port.
Cd/usr/ports/archivers/pecl-rar
Make
Make install
Remember to restart Apache after insta
Zip code. This is the postal code of the United States. Currently, only the postal code in the United States is State-owned, and other industries are not State-owned. the reason for providing us zip code today is that you need to
PECL (The PHP Extension Community Library)There is a rar package available for use.However, you must install it manually.For Unix, refer to the following installation method:
Fetch http://pecl.php.net/get/rar-x.x.x.tgzGunzip rar-xxx.tgzTar-xvf rar-xxx.tarCd rar-xxxPhpize./Configure make install
Of course, if freebsd is used, port installation will be faster.
Cd/usr/ports/archivers/pecl-rarMakeMake install
Remember to restart apache after installationAfter installation, you can perform a test.C
Finally, let me find the solution, that is, to implement this function through the PHP program execution function, because there are too many things that can solve ZIP files now (if you do not believe it, you can go to the place where you have downloaded the software to find it, so you will not be disappointed, and I will not be wrong ).The following is the original file of the program:# Upload. php Tutorial The
/**********************
* @file-path to zip file
* @destination-destination directory for unzipped files
*/
function Unzip_file ($file, $destination) {
Create Object
$zip = new Ziparchive ();
Open Archive
if ($zip->open ($file)!== TRUE) {
Die (' Could not open archive ');
}
Extract contents to dest
Use an open-source Ajax Library: Ajax toybox
Description:When registering or checking out a shopping cart, you need to fill in your personal data. This step can be concise. We only need to fill in the zip code for the guests and then follow the zip code, the database automatically retrieves the corresponding province,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.