PHP strptime () function tutorial
Definitions and usageThe strptime () function resolves a time/date generated strptime ().
This function returns an array of date profiling. The key to return the array is:
[Tm_sec]-SEC (0-61)[Tm_min]-min
PHP Microtime () Function Example Tutorial
Microtime () Definition and usageThe Microtime () function returns the current UNIX timestamp and microseconds.
Grammar
Microtime (Get_as_float)Parameter Description get_as_float Optional. When set to
PHP $_get
$_get variables are a form and method used to collect values = "get".
$_get variableThe $_get variable is the HTTP GET method emitted by a series of variable names and values.$_get variables are a form and method used to collect
Summary: As a key way for users to submit information, form is always one of the most basic aspects of PHP programming, as well as a big focus and difficulty that beginners will encounter. We choose to deal with the number of associations, to get
A function is a named code that completes a specified taskFunction name (parameter 1, parameter 2, Parameter 3 ...){function bodyreturn value}For example:function jsq ($cs 1, $cs 2, $SF){$JG = 0;Switch ($SF){Case "+" $JG = $cs 1+ $cs 2;break;Case "-"
Connecting to a database$link _id = mysql_connect ("localhost", "root", "") or Die ("Connection failed");if ($link _id){mysql_select_db ("My_test");if (!$_get[id]){
$result =mysql_query ("SELECT * from UserInfo");echo " number User name Sex Age
Before accessing a file, we usually need to determine whether the file exists to avoid errors caused by calling a non-existent file.Php checks whether a file has a function: file_exists (). The structure is as follows:File_exist ($ string );The $
UsageSprintf (format, arg1, arg2, arg ++)DescriptionThe format parameter is the conversion format. It starts with the percent sign ("%") and ends with the conversion character. The following possible format values:• %-Return percent sign• % B-binary
The scope of a variable is the context defined by it (that is, its effective range ). Most PHP variables have only one separate range. This separate range span also contains the files introduced by include and require. For example: The code is as
The setcookie () function sends an HTTP cookie to the client.Cookie is a variable sent from the server to the browser. Cookies are usually small text files embedded into users' computers by servers. This cookie is sent every time a computer requests
Syntax:String strstr (string haystack, string needle)Returns the string starting from needle to ending in haystack.If no value is returned, that is, no needle is found, FALSE is returned. Note: This function is case sensitive.Instance 1 The code is
Opendir syntaxOpendir (path, context) DirectoryFunction descriptionOpen the directory handle. If the opendir () function opens a directory handle, the function returns a directory stream; otherwise, false is returned. Let's take a look at opendir to
Krsort(PHP 4 and PHP 5)Krsort-the key order of the sorted array is the opposite.DescriptionBoolean krsort (array & $ array [Summary $ sort_flags = SORT_REGULAR])A variety of important sequences are reversed to maintain the relevance of key data.
Array_reverse(PHP 4 and PHP 5)Array_reverse-returns an array whose content order is reversed.DescriptionArray array_reverse (array $ array [, Boolean $ preserve_keys = false])Use a command to input an array and return a new array to reverse the
Array_chunk("= 4.2.0, PHP 5" in PHP 4)Array_chunk-DescriptionArrayArray_chunk(Array input, int size [, bool preserve_keys])Array_chunk ()Splits an array into multiple arrays. The number of units in each array isSizeDecide. The number of units in the
Is_writable(PHP 4 and PHP 5)Is_writable-tell whether filename is writtenDescriptionBoolean is_writable (string $ file name)Returns TRUE if the object exists and can be written. This file name parameter may be a directory name that allows you to
Fgets(PHP 4 and PHP 5)Fgets-get the pointer to the line slave fileDescriptionString fgets (resource $ processing [Summary $ length])Get the line from file pointer.ParametersHandleThe file pointer must be valid and must point to a file that
PHP strchr () function example tutorialDefinition and usageThis strchr () function searches for a series of other internal strings for the first time.This function returns the remaining strings (from the matching point), or FALSE if this string is
Php Tutorial: PHP number_format () instance tutorialDefinition and usageThe number_format () function is formatted with thousands of groups.SyntaxNumber_format (number, decimals, decimalpoint, separator)NumberRequired. Number to format. If no other
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