PHP String Common operation function

Source: Internet
Author: User
Tags set time

PHP String Common operation function

Strval Converting variables to strings

Strrev Inverse string

Trim strips the first and the first half of a string

LTrim remove the English space from the left half corner

RTrim Remove the English space in the right half of the corner

strlen length of string to be taken long

SUBSTR truncate SUBSTRING

STRRCHR find where the characters last appear in the string

Strpos where the string first appears

Addslashes String Escape

strcmp Compare the size of two strings 1 0-1

CHR Return asc| | The character that corresponds to the value

Ord returns the corresponding asc| of the character | Value

PHP string Common Date-time function

Date () Fetch dates

Mktime () Convert date to timestamp

Time () takes the current timestamp s

Microtime () puts the current timestamp, as well as the subtle 1 seconds =1000000 subtle


Current returns the element of the array

Explude converting a string to an array string

Implude to convert an array into a string

Strtolower converting a string to lowercase

Array_rand () array random function

Global variable keyword

Parse_ini_file//Read INI configuration file

Enctype= "Multipart/form-data"//php upload files necessary parameters

UrlEncode () URL link parameter encryption, prevent Chinese parameter garbled and parameter space problem

UrlDecode () URL link parameter decryption.

Set_time_limit (0) Set time, if 0 is infinite extension

Two commonly used static technologies: Pseudo-static, true-static,
Pseudo-Static:

There are two ways of implementing this:

One is to place a. htaccess file in the root directory of the Web site, adding a rewrite rewrite statement

Second, in the Apache configuration, add the rewrite rewrite statement

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.