PHP implementation of four basic sorting algorithms

Many people say that the algorithm is the core of the program, the quality of the algorithm determines the program. As a primary phper, although it is seldom exposed to algorithmic aspects of things. However, the basic sorting algorithm should be

Encryption and decryption of PHP code

PHP Code Encryption Class /* * @auther: Wangyaofeng * @time: 2014.11.6 * @action: Encrypt the PHP project, note that if there is a framework directory in the project or there is no need to encrypt the directory,

PHP recursively iterates through all files in the specified directory and counts the number of files

PHP recursively iterates through all files in the specified directory and counts the number of files Recursive functions to traverse directories and files under a specified file function Total

PHP download file Code "can be self-named"

Use get to pass in Parameter http://domain/download.php?file= ' savepath on server ' &name= ' file name ' want ' Incoming file path and file name, respectively, for reading files and renaming files if (Empty ($_get[' file '

Share 2 more classic PHP encryption and decryption functions

ord

This article mainly introduces 2 more classic PHP cryptographic decryption function sharing, one is discuz! authcode cryptographic function (with detailed decomposition), one is encrypt () function, are more classic, need friends can refer to the

PHP comparison of two string length methods

The example in this article describes how PHP compares two string lengths. Share to everyone for your reference. The implementation method is as follows:This code calculates the length of the two string and calculates its difference

PHP Statistics Online User number

/** * Created by Phpstorm. * User:jifei * DATE:15/11/24 * time:20:58 * * Millions of users per minute, real-time statistics the total number of online users in the last 15 minutes */ Class Onlineuser {

What are the super global variables in PHP?

The super global variables in PHP are:$GLOBALS, all global variable arrays (like the global keyword, which allows access to global variables within a function-for example, in the form of $globals[' myvariable '). )$_server, array of server

East Wood bookstore Dmnovel novel released

I like to read novels in my spare time (of course, genuine, pirated), many of the novel website ads, restrictions a lot, I would like to engage in an ad-free site. Down from the Internet a lot of programs, either do not meet their own requirements,

PHP-based Apple serial number query interface call code instance

Code Description: PHP-based Apple serial number query interface call code instanceAssociated data: Apple serial numberInterface Address: HTTP://WWW.JUHE.CN/DOCS/API/ID/37 // +--------------------------------------------------------

Code to convert MySQL data to Excel output

$DB _server = "localhost"; $DB _username = "mydowns"; $DB _password = ""; $DB _dbname = "mydowns"; $DB _tblname = "user"; $Connect = @mysql_connect ($DB _server, $DB _username, $DB _password) Or Die ("couldn@ #t Connect.

Generate Verification Code

Require_once (' string.func.php '); function Verifyimage ($type =1, $length =4, $pixel =0, $line =0, $sess _name= "verify") { Session_Start (); /* Define length and Width */ $width = 80; $height = 30;

Import and export of CVS files PHP class code

CVS file import and Export PHP class code, through this custom PHP class can achieve database data and CVS file conversion /** * CSV file Processing class */ Class csv{ Public $csv _array; CSV array data

A PHP verification code generated class code

Class Validationcode { Property Private $width; Private $height; Private $codeNum; Private $image; Private $disturbColorNum; Number of interfering elements Private $checkCode; function __construct ($width

Get your country's PHP code by IP address

function Getlocationinfobyip () { $client = @$_server[' http_client_ip '); $forward = @$_server[' http_x_forwarded_for '); $remote = @$_server[' remote_addr '); $result = Array (' country ' = ', ' city ' = '); if

PHP implements the escape and unescape functions in JavaScript

Escape function /** * JS Escape PHP implementation * @param $string The sting want to be escaped * @param $in _encoding * @param $out _encoding */ function Escape ($string, $in

PHP time and date processing collation

Returns the timestamp of all months in a time period function Monthlist ($start, $end) { if (!is_numeric ($start) | |! Is_numeric ($end) | | ($end $start =date (' y-m ', $start); $end =date (' y-m ', $end); Convert to

PHP Unzip zip file

function unzip ($location, $newLocation) { if (EXEC ("Unzip $location", $arr)) { mkdir ($newLocation); for ($i = 1; $i $file = Trim (Preg_replace ("~inflating: ~", "", $arr [$i]); Copy ($location. ' /'. $file,

PHP via socket post data to other Web servers

function Post_request ($url, $data, $referer = ") { Convert the data array into URL Parameters like A=b&foo=bar etc. $data = Http_build_query ($data); Parse the given URL $url = Parse_url ($url); if ($url ['

PHP Operations Redies Encapsulated classes

/** * Redis operation, support master/slave load cluster * * @author Jackluo */ Class rediscluster{ Whether to use M/s's read/write cluster scheme Private $_isusecluster = false; Slave Handle

Total Pages: 5208 1 .... 3134 3135 3136 3137 3138 .... 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.