PHP uncompressed zip file

The zip file can be decompressed. It has two parameters: the path to the compressed file, and the path to the destination file. function Unzip_file ($file, $destination) { Create Object $zip = new Ziparchive (); Open

Common regular Expressions for PHP

Class verify{ /** * Verify user name * @param string $value * @param int $length * @return Boolean */ public static function Isnames ($value, $minLen =2, $maxLen =20, $charset = ' all ') { if (empty ($value))

PHP code that formats the Linux runtime into an easy-to-read format

!--? php $exec = shell_exec (' uptime '); $uptime = explode (' Up ', $exec); $uptime = Explode (', ', $uptime [1]); if (strpos ($uptime [0], ' Day ')) { $time = Explode (': ', $uptime [1]);

PHP Check Date function Checkdate Use example

Grammar Integer checkdate (int%month, int $Day, int $Year); Demo Code echo "2/29/1900"; Checkdate (2, 1900)? print "is Valid":p rint "was not Valid"; echo "\ n"; echo "2/29/2000";

PHP backs up the entire MySQL database, or specifies a table

The PHP class implements a full backup database, or the ability to back up a specified table in a database: Class Backup { /** * @var Stores the options */ var $config; /** * @var stores

PHP File Upload Example

File Uploader File Upload Select a file to upload: Copy Codeuploader.php !--? php if ($_files[' file ' ['

Unzip a file using Phpzip

# # Phpzip v1.2 by Sext (sext@neud.net) 2002-11-18 # (CHANGED:2003-03-01) # # makes ZIP archive # # Based on "Zip File Creation Class", uses ZLib # # Class Phpzip { function Zip ($dir,

A number of API interface platform to compare the price of various platforms.

Digital API interface platform, in the development of the app or the web will inevitably use the courier data, illegal data and so on. Now it's time to count the various platforms that provide API interfaces and the prices of common API interfaces.

Image upload and use ImageMagick to generate thumbnail images

With ImageMagick, you can easily and quickly create thumbnails that are much easier to use than PHP. Location to upload main image: $mainDir = $_server[' Document_root '). ' /images/l/'; Location to create the thumb

PHP analog Post send data

$flag = 0; The data to post $ARGV = Array ( ' var1 ' = ' abc ', ' var2 ' = ' How are you '? Constructing the Post string foreach ($argv as $key = = $value) { if ($flag!=0) { $params. = "&"; $flag = 1;

PHP Multi-threaded Batch acquisition download image implementation code

Multi-Threading using curl, in addition to curl can set the request time, encountered a very slow URL resources, can be determined to give up, so that there is no blocking, in addition to multi-threaded requests, the efficiency should be higher

PHP gets the code for last week, this week, last month, this month, this quarter, and last quarter

echo Date ("Ymd", Strtotime ("Now"), "\\n"; echo Date ("Ymd", Strtotime ("1 week Monday")), "\\n"; echo Date ("Ymd", Strtotime ("1 week Sunday")), "\\n"; echo Date ("Ymd", Strtotime ("+0 Week Monday")), "\\n"; echo Date ("Ymd",

Use Phpmailer to send messages with attachments and support HTML content

Phpmailer is a packaged PHP mail sending class, support for sending HTML content of e-mail, and can add attachments to send, not like the php itself mail () function requires server environment support, you only need to set up the mail server with

PHP implements a simple symmetric encryption and decryption method

/** * Universal Encryption * @param string $string strings that need to be encrypted * @param String $skey Encryption Eky * @return String */ function EnCode ($string = ', $skey = ' echounion ') { $skey =

PHP Send e-mail class

/*********************************************************************************** Instructions for use: $m = new Sendm (' SMTP server address ', ' account ', ' Password ', port (int), timeout retry time (int)); $m-

PHP implementation calculates the size of a folder

function Dirsize ($directoty) { $dir _size=0; if ($dir _handle= @opendir ($directoty)) { while ($filename =readdir ($dir _handle)) { $subFile = $directoty. Directory_separator. $filename; if ($filename = = '. ' | |

Examples of definitions and inheritance usages of PHP classes

This article describes the definition and inheritance usage of PHP classes. Share to everyone for your reference. Specific as follows: /* * Class */ class People { Public $name; Public $age;

So how does the 0-based classmate learn PHP?

For the 0 basic students, learning PHP is definitely a great need for perseverance. Learning in any language is not possible overnight, but it takes a lot of time and energy to learn. It is not a class that is reported to be able to learn. This is

PHP generates a digital letter verification code picture

PHP generates a digital letter verification code picture Header (' content-type:image/png '); $image =imagecreatetruecolor (100, 30); $color =imagecolorallocate ($image, 255, 255, 255); Imagefill ($image,

PHP Get Picture Details (width and height format size)

function Getimageinfo ($img)//$img absolute path for image file { $img _info = getimagesize ($img); Switch ($img _info[2]) { Case 1: $imgtype = "GIF"; Break Case 2: $imgtype = "JPG"; Break Case 3:

Total Pages: 5208 1 .... 2035 2036 2037 2038 2039 .... 5208 Go to: GO

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.