This article is mainly for you to introduce in detail the use of PHP zlib function, easy to implement PHP file package download zip, with a certain reference value, interested in small partners can refer to
The example of this article for everyone to share the php file package download zip code for everyone to refer to, the specific content as follows
PHP zi
Recently developed projects require the use of provincial, municipal, and district data, because the projects to be developed are also e-commerce websites. when referring to the user experience of Vanke, it was found that it even had the latest released Guangming New Area in Shenzhen, and no data was updated on the Pat network. It seems that fanke is still responsible for data updates, so he learned about its data format, then I spent some time writing a small program to extract the latest provi
Copy CodeThe code is as follows:
Class zip
{
var $datasec, $ctrl _dir = Array ();
var $eof _ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
var $old _offset = 0; var $dirs = Array (".");
function get_list ($zip _name)
{
$zip = @fopen ($zip _name, ' RB ');
if (! $
Zip Code:
Copy Code code as follows:
Zip "D:\test.iso", "D:\test.zip"
Zip "D:\test", "D:\test.zip"
Msgbox "OK"
Sub Zip (ByVal mysourcedir, ByVal myzipfile)
Set fso = C
I ignore caseG Global MatchM multi-line matching/*Zip matchvar pattern =/^[\w\-]+\. (Zip|gz|rar) $/; [a-za-z0-9_] can be replaced with \wPlus ^ Qualifying first character matchvar str = ' 2-13.rar '; File Name: letter _ number. zip,gz,rar,7zdocument.write (Pattern.exec (str));Compress Package name matchingvar pattern =/^[\w\-]+\.
1. Vulnerability related informationVulnerability name : Spring Integration Zip unsafe decompressionVulnerability number : cve-2018-1261Vulnerability Description : In versions prior to Spring-integration-zip.v1.0.1.release, a malicious user constructs a file containing a specific file name in a compressed file (the affected file format is bzip2, tar, XZ, war , Cpio, 7z), when an application uses Spring-integration-
Because some situations need to use the National Administrative Division database, itself does not have the library on the Internet to find, but found is basically not what I want, because it contains only the basic information,Finally himself under a primitive library to prepare their own assembly data, online XX data network Ah, Web services are limited, or to find their own way to get the hands of the most assured.The original data is April 2015, the original data only the basic level three (
This article describes the JS and jquery verified e-mail, mobile phone number, zip code method.
jquery Code:
Verify ZIP code
$ ("#postcode"). blur (function () {
//Get Postal code
var postcode=$ ("#postcode"). Val ()
Careful research, the original use of PHP to write the decompression program efficiency than the imagination is still high many, since so good, and then optimize the use of their own backstage, although now most of the space Control Panel has compression and decompression this function, but sometimes some trouble.Do this before, no contact with the PHP compression this piece, online search some, most are PHP compression class, compression function, less than hundreds of lines, more than thousand
JS mobile phone number, zip code, area code, ID card Verification program
Mobile phone Number Inquiryfunction Checkmobile () {var smobile = Document.mobileform.mobile.valueif (!) ( /^13[0-9]d{4,8}$/.test (Smobile))) {Alert ("Please enter your mobile number (at least the first 7 digits)");Document.mobileform.mobile.focus ();return false;}}Postcode inquiryfunction
The address information of the city needs to be used in recent projects, but few of the XML data downloaded from the Internet are the latest address information... the data is too old, leading to incomplete information in some regions. That's why I think the weather forecast official website has the latest and most comprehensive data. Paste the code, hoping to save some time for friends who are equally confused.
/*** @ Param var city name * @ returns
Digital mail, telephone, fax, zip code, address verification code
# Region verify that the input string is a number/// /// Verify that the input string is a number/// /// /// Public bool validatenum (string p_str_num){Return regex. ismatch (p_str_num, "^ [0-9] * $ ");}# Endregion
# Region verification the input string is the phone number/// /// Verify that the
This article to provide the expression is the URL card number ZIP code QQ number of the integer English Zhong Wenjing code Oh, let us one by one note it.
URL:/^http://[a-za-z0-9]+. [a-za-z0-9]+[/=?%-_~ ' @[] ': +!] * ([^
Idcard:/^d{15} (d{2}[a-za-z0-9])? $/,//Ka
Currency:/^d+ (. d+)? $/,
Number:/^d+$/,//Digital
Zip
JS Common mobile phone number ZIP code number regular verification
*/
Phone number Verificationfunction Istelephone (str){RegExp =/^[0-9]+ (-[0-9]+) {1,2}$/;return Regexp.test (str);}
ZIP Code Verificationfunction Ispostcode (str){RegExp =/^[0-9]{6,6}$/;return Regexp.test (str);}
Mobile Verification
functio
PrefaceJust now on the internet to inquire about the national provinces and Cities database, compared to the pit is a relatively comprehensive data, a comprehensive fee, the heart is very uncomfortable.But in the end, I got it. A slightly better national provincial and municipal database, and with left, simple spell, abbreviation, pinyin, Administrative Code, ZIP code
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.