PHP Common Functions Summary sharing
For you to share PHP commonly used array, string, time, file operation function, I hope to learn PHP development of friends to help.
Array: "Focus 1" implode (delimited, arr) connects the array value data to
(1) Date
Usage:
Date (format, [time]);
If there is no time parameter, the current time is used.
The format is a string in which the following characters have special meanings:
U is replaced by the number of seconds since a starting time (as if it
In PHP, there are a lot of string segmentation functions, let me give you friends to introduce a variety of PHP string segmentation examples, the need for friends to enter the reference.
The basic syntax for the PHP function split () is
Array split (
These are addressed to junior PHP programmers or beginners, who can float past, welcome additions and comments, and accept reasonable opinions and criticisms.
Some of these PHP concepts are just beginning to be difficult to understand, I have listed
String.Format () "Example in detail"Finishing by: VashonObjective:String.FormatAs a text processing tool, we provide a powerful and rich string formatting function, in order not to stop the simple callString.Format ("Hello%s", "Vashon");, keep your
PHP converts a date string to the current number of days as an example and input a date string. for example, 2011-3-23 outputs the current number of days as an example. for example: 1? Code :? PublicstaticfunctionconvertDateToLong ($ dateStr) {$
How does php compress all files in a folder into a zip file? How does php compress all files in a folder into a zip file? For example, my localhosthas a testfolder with many files and folders in it. how can I pack all test.zip files into test.zip ?,
In PHP, mktime is converted to milliseconds. In php, there are many ways to convert a time date into a timestamp (converted to milliseconds). The simplest way is to use time () we can directly obtain millisecond. if it is like, there are many ways
Summary of php string segmentation functions. In php, there are many string segmentation functions. next I will introduce various php string segmentation instances to you. if you need them, please refer to them. The PHP function split () is based on
Here are some of the time functions in PHP:
(1) Date
Usage:
Date (format, 1141064899);
If there is no time parameter, the current time is used. The format is a string in which the following characters have special meanings:
You replace the
Use of some functions in sqlserver (05:
I. Time functions:
DateAdd ([year, Quarter, month, day], number, date)
Function Description: used for addition or subtraction within a specific time range
Parameter description: [year, Quarter, month, and day]
/* Converts Gregorian date to seconds since 00:00:00.* Assumes input in Normal Date Format, I. e. 23:59:59* => Year = 1980, MON = 12, Day = 31, hour = 23, min = 59, SEC = 59.** [For the Julian Calendar (which was used in Russia before 1917,* Britain
//************************************** **************************// // Script compont Object Model // Design for DHTML // Copyright 2003 version 1.0 // Made by Yin Shuguang //************************************** **************************// //
// Created by Bouchon// Http://dev.maxg.info
// Need help? Http://forum.maxg.info
Class zip{
VaR $ datasec, $ ctrl_dir = array ();VaR $ eof_ctrl_dir = "/x50/x4b/x05/x06/x00/x00/x00/x00 ";VaR $ old_offset = 0; var $ dirs = array (".");
Function
The basic syntax of the PHP function split () is array split (string $ pattern, string $ string [, int $ limit]). We will give you two examples to illustrate how to use this function.
For beginners, understanding the usage of common functions in
The basic object-c syntax NSDate is used to learn about NSDate settings, get the current time, the time after the current time plus or minus seconds, date comparison, and date conversion to NSString.
XCode4.6.3, OS X SDK 10.8; NSDate date operation,
System modification time in Linux
Linux system modification time
Two steps
(1) date 042612492005
(2) hwclock-w
The first step is to set the time. After the time is set, you can run the date command to check whether it is correct... note that it is a
Split
(PHP 3, PHP 4)
Split -- use a regular expression to split a string into an array
Description
Array split (string pattern, string [, int limit])
Tip: The preg_split () function uses Perl-Compatible Regular Expression syntax, which is usually a
Tcsh has its own advantages, but it is not good for Linux players. So for Bash, first install bash under/usr/ports/shells/bash. Then run the CHSH command to modify the default shell of the user (here, I am nagging, VI is really not as good as EE .)#
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.