PHP short link, short URL, short URL implementation code

/** * Short Connection generation algorithm * site:bbs.it-home.org */ Class Short_url { #字符表 public static $charset = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"; public static function

Share: PHP 4 ways to traverse files

/** * Get all files in current directory and sub-directory * @param string $dir path name * @return Array of paths for all files in array */ function Get_files1 ($dir) { $files = Array (); if (!is_dir

Summary of the PHP traversal array foreach each () List () method

foreach ($array as $value) {//$array the array to traverse, $value pointer to the current value of the array, as the function of the assignment code to executed; } Copy CodeThe foreach statement can also get the key name of

PHP two ways to add a Curl extension library

zts

wget http://curl.haxx.se/download/curl-7.19.6.tar.gz TAR-ZXVF curl-7.19.6.tar.gz CD curl-7.19.6 ./configure--prefix=/usr/local/curl Make Make install Copy Code2, compile the build extension into the PHP

Discussion: The difference between a comma and a dot in PHP

With everyone to discuss, in PHP programming, the comma and dot difference of that point, there is a need for friends, may wish to refer to the next OH.In PHP, the comma is faster than the dot number, what is the reason for geometry? This article

PHP file Upload class Upload_class extension classes and examples

This article describes a PHP class for uploading images based on an extension of the previous Upload_class class. If you need a friend, you can refer to it below.Share a PHP extension class that uploads image files, based on the previous article: an

PHP-Created FTP class (upload, download, move, create, etc.)

This article introduces, PHP implementation of an FTP operation class, you can implement the file upload, download, move and create functions, the need for a friend reference.1,php How to use FTP 2,ftp Upload Class conn_id = @ftp_connect ($

PHP to determine if the source of access is the phone and automatically jump code

This article introduces, PHP detects whether the source of access to the mobile phone, is the word automatically jump to the mobile phone page two ways to implement. Refer to a friend who needs it.The following two methods can be used to determine

PHP array Getting Started Tutorial Array_keys () function

This article describes the use of the Array_keys () function in the PHP array, as required by a friend reference.In the PHP array function, the Array_keys () function returns an array that contains all the keys found in the searched array.The form

PHP Gets the implementation code for the MAC address

/** * Get the physical (MAC) address of the machine card * Currently supports Win/linux system * Editor: Bbs.it-home.org **/ Class Macaddinfo { var $return _array = Array (); Returns an array of strings with MAC

Memory_get_usage get the current PHP memory consumption example

Echo Memory_get_usage (); $var = Str_repeat ("phpzixue.cn", 10000); Echo Memory_get_usage (); Unset ($var); Echo Memory_get_usage (); ?> Copy CodeOutput: 62328 122504 62416 Description: The

A class that replaces the PHP session with a MySQL memory table

/** * Session MySQL Memory table @Usage: Use some other storage method (MySQL or memcache) instead of PHP Sessoin @author: Lein @Version: 1.2 */ Session_Start (); if (!isset ($_session[' test ')) { $_session['

Example of PHP Deleting a set of files

"!--These files must exist to work" xample)--> copy code 2, delete code for a group of files process.php !--? php # Take each checked value, and give it a name of $delete foreach (

Two examples of PHP global variable $_server

This article describes two examples of PHP global variables $_server, namely, record access information, $_server[' Request_ The use of METHOD '. Please refer to the friends who are in need. Example 1, record the visitor information to obtain the

Implementation code for APC and file cache classes in PHP

Class Cacheexception extends Exception {} /** * Caching Abstract classes */ Abstract class Cache_abstract { /** * Read Cache variables * * @param string $key cache subscript * @return Mixed */

Examples of PHP drawing techniques

This article shares a PHP drawing example, learning how to manipulate graphics techniques in PHP, including drawing various graphics, writing text, copying the canvas and other operations, the need for a friend reference.1, Picture format: Common

PHP GD library dynamic generation of line chart instance code

/** * PHP GD library generates line chart, histogram, pie chart * by bbs.it-home.org */ $img _gao=170; $img _kuan=0; $jiange the interval between the =30;//and the point, the resulting image width automatically changes

PHP MCrypt Small examples of encryption and decryption

/** * MCrypt Encryption and decryption * by bbs.it-home.org */ $data = ' data '; $key = "key"; $algorithm = Mcrypt_blowfish; $mode = MCRYPT_MODE_CBC; $iv = Mcrypt_create_iv (Mcrypt_get_iv_size

PHP Line chart generation functions and examples

/* * PHP generates a line chart * by bbs.it-home.org */ function Line_stats_pic ($value _y, $width, $high, $strong =1, $fix =0) { Y-Value processing function function line_point_y ($num, $width, $high, $max _num_add,

PHP Cookies Operation class (with source code)

/** Cookies class to save, read, update, and erase cookies data. Prefix can be set. Force timeout. The data can be strings, arrays, objects, and so on. * Date:2013-12-22 * Author:fdipzone * ver:1.0 * edit:bbs.it-home.org *

Total Pages: 5208 1 .... 1531 1532 1533 1534 1535 .... 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.