Introduction PHP is a very surprising language. It is powerful enough (the core language of the largest blog (wordpress) and extensive enough (running on facebook, the largest social networking website). It is simple enough (as the preferred
PHP gets days of the week and dates of Monday and next Monday for this week
$today =date ("y-m-d");
echo $today;//You can get the date today. Output 2014-9-29
Define an array first.
$rows =array ("Day", "one", "two", "three", "four", "five", "
PHP notes: Introduction to the use of date functions. Introducing PHP is an amazing language. It is powerful enough (the core language of the largest blog (wordpress) and extensive enough (running on facebook, the largest social networking website ).
PHP has a wealth of library resources, which makes it easy for developers to process some businesses. Since we have the most contact with dates in the project, we will start with date functions today.
PHP is a very surprising language. It is
Introduced
PHP is a very amazing language. It's strong enough (The biggest blog (WordPress) core language), it's broad enough (running on the biggest social networking site on Facebook), it's simple enough (as a beginner's preferred entry language).
Introduction
PHP is a very surprising language. It is powerful enough (the core language of the largest blog (wordpress) and extensive enough (running on facebook, the largest social networking website). It is simple enough (as the preferred
PHP has a wealth of library resources, which makes it easy for developers to process some businesses. Since we have the most contact with dates in the project, we will start with date functions today.
PHP is a very surprising language. It is
First, sequential control:
This is done by default from left to right, from top to bottom in a simple order. Uncontrolled process.
Second, branch control:Single branch, dual branch, multi-branch;Single-branch Syntax:
$age =17;if ($age
Two-branch
C-shell excellent program-general Linux technology-Linux programming and kernel information. The following is a detailed description. 1. switch usage. Note that each case must end with breaksw
Otherwise, the next case command will be executed.
(1)
Bash working features:1. Support Command history, command completion2. Support Pipeline, redirect3. Support Command aliases4. Support for command line editing5. Support Command line deployment6. Support File name wildcard7. Support for using
The shell quotesin the the shell often uses single quotes, double quotes, back quotes ( keys above the Tab key in the keyboard), backslashes ( meaning of some Shell metacharacters). If we sometimes want the echo command to output a character that
Business background:
Let a.sh and b.sh execute simultaneously, not sequentially
Solution:
S.SH is responsible for dispatching a.sh and b.sh.
The code is as follows:s.sh#!/bin/bashsource/etc/profile;date= ' 2015-05-06 '
1 Invoke MdoelsimIn order to open Modelsim automatically, it's better to use a shell script to invoke Modelsim.1 #!/bin/bash 2 #----------------------------------------------------------------------------3 # Invoke Modelsim 4 #-----------------------
first, the application of shell variables1. Types of Shell variables·User-defined variables: defined, modified, and used by the user ·Pre-defined variables: Bash predefined special variables that cannot be modified directly·Positional variables:
Linux Special symbols===========================================================================================$ numberUsually represents the meaning of a variableecho $ variable name = variable Value= equals signThe general definition of variables
PHP Output Time difference function
Copy Code code as follows:
Date_default_timezone_set (' PRC ');//default time zone
echo "Today:", Date ("Y-m-d", Time ()), "";
Echo "Today:", Date ("Y-m-d", Strtotime ("June 2008")), "
Compare days with 2 dates1. Script referenceScript 1:
#!/bin/bash#格式化过期日期,格式化过期日期完整时间以当前时间作为参考!expday="2018-04-11 `date +%T`"echo "Expire day is $expday"#当前日期时间格式为stamp时间戳todays=`date +%s`echo "Today is $(date +"%F %T")"#以下2种方式做时间的四则运算,分别使用
1. SHELL local variables: Local variables act only in this SHELL, just like local variables. It does not affect variables in other shells. Format: NAME = value 1. Call a variable: add $$ Echo $ HOME/Home/hbwork$ WEEK = Satur$ Echo Today is $
This article is to share the content of PHP in the date () and time () function of the application, the need for friends can refer to
1, the current timestamp (unit: seconds)
Description: The time () function returns the number of seconds of the
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.