An example of how to obtain the timestamp using mktime in php
$ Now = mktime (0, 0, 0, date ("m"), date ("d"), date ("Y "));
Echo "now is". date ("Y/m/d", $ now );
Display result: now is this is obviously
Code that displays the start, end, and timestamp of today, this month, last month, and this year
/**
Example of a php timestamp combination application
Date: 2013/2/19
Link:
Php get detailed description of current date and time
Date_default_timezone_set ("Asia/Hong_Kong ");
$ Time1 = strtotime (date ("Y-m-d H: I: s"); // The current system time
$ Time2 = strtotime ("17:10:00");
Php-redis document 2
This article is the second part of the php-redis Chinese document. Next, I will continue to introduce some of the commands officially provided by apsaradb for redis. For more information, see.This article is the second
Comparison and analysis of include () and require () in php
Php's require () and include () are not significantly different in terms of performance. The only difference is that the file must be read and evaluated each time when the
How to use the include encryption path in php
Include_once 'include/Base. php ';
$ Path = '';
$ Url = isBase: decrypt (urlDecode ($ _ SERVER ['query _ string']);
Parse_str ($ url); // GET the variable
Use _ FILE _ to flexibly obtain the FILE path
// Obtain the current file path + file name
Echo _ FILE __;
Echo'';
// Obtain the current path of the object
Echo dirname (_ FILE __);
A class written by php to generate static pages
/**
Function: generate a static page
Finishing: script School bbs.it-home.org
Date:
*/
Class html
{
Var $ dir; // dir for the
Two php functions: generate serial numbers and replace strings
/**
* Serial number generator
Func: snMaker
Param: $ pre =''
*/
Function snMaker ($ pre = ''){
$ Date = date ('ymmd '
Notes for php character escape
$ Str = "ffff \ 0 ffff ";
Echo (strlen ($ str ));
Echo ("\ n ");
For ($ I = 0; $ I
Echo ("\ n ");
Output result :----------------------9 102 102
Learning the php Adapter mode
The Adapter mode of the php design mode, that is, the Adapter (alias Wrapper) mode: converts an interface of a class into an interface of another class that the customer expects. The adapter allows the class
PHP simple implementation of bubble sorting
When learning php, I dare not approach the algorithm. I am afraid to disturb my own thoughts. now, it is really the same thing to review it. Hey! Have you ever encountered such a situation? Ha
Three categories summarize five PHP design patterns
Factory modelSingle element modeObserver ModeCommand chain modeRule mode
Class people {
Private $ name = '';
Private $ user = null;
Private function _
Application and introduction of php's curl_setopt function
// Address of the Forum api logon interface
$ Uri = "http // www.wap.com/ssdfasdfsf"
// Parameter array
$ Data = array (
'Username' => 'username
A UTF-8 encoded Unicode function implemented by php
Function Utf8ToUnicode (strUtf8)
{
Var bstr = "";
Var nTotalChars = strUtf8.length; // total chars to be processed.
Var nOffset = 0; //
Php watermark code for an enhanced version
/*
* Function: PHP image watermark (watermarks support images or text)
* Parameters:
* $ GroundImage: specifies the background image to be Watermark.
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