Second, design skillsprogramming habits vary from person to person, here only to provide some experience, can be consulted. 1. Use include to modularize your program codeThe include function basically says, "It's like reading another file (HTML or
This article mainly introduces the common time processing methods for PHPdate functions. This article describes how to obtain the time of today, tomorrow, yesterday, one week, one month ago, one month, and so on, for more information, see
The Code
Security Defense: Add a lock to cmd
First, create a new notepad, copy the following code, save it as cmd. bat, and save it in the root directory of drive D.
The Code is as follows:
@ Echo off
Title CMD---- dedicated to ノ
SETLOCAL
Set pwd = 0
Set
Copy codeThe Code is as follows:Date_default_timezone_set ('prc'); // Default Time ZoneEcho "Today:", date ("Y-m-d", time (), " ";Echo "Today:", date ("Y-m-d", strtotime ("18 June 2008"), " ";Echo "yesterday:", date ("Y-m-d", strtotime ("-1 day"), "
Shell scripts contain several Unix commands or executeProgram.
1. Run the shell script
There are two ways to run shell scripts. The first method is to use the sh command to take the shell script file name as a parameter. This method requires
Script is very practical and can simplify manual operations. The following script deletes the log files from the previous seven days.
Bat script:
@ Echo Off Echo ------------ Delete log file, Develop by Terry ------------- Echo Today Date ::%
$ Date1 = Strtotime ( ' 2011-04-30 ' ); // Converts a date to a timestamp. $ Date2 = Time (); // Returns the timestamp of the current time. $ Nowtime = Strftime ( " % Y-% m-% d " , $ Date2 ); // Format the
In shell, there are three types of quotation marks: single quotation marks, double quotation marks, and reverse quotation marks.
Single quotation marks 'all characters enclosed by single quotation marks are common characters. When special characters
Shell is the interface between the user and the Linux operating system. There are multiple shells in Linux, where Bash is used by default. This chapter describes how shell works, shell types, General Shell operations, and bash features. Shell is the
In PHP we want to get today is the day of the week can be directly using the DATE function to operate, the following I will give you a summary of the specific methods of operation, I hope this method for friends to help.
PHP Gets the week method
This tutorial is about three points to get the formatted date and time. Handles UNIX timestamps. Gets the date and time information. The calculation of the date. Validates the validity of the date.
PHP Tutorial Processing date and Time (PHP beginner
Today we see in PHP to calculate the time difference between two times, the following we directly use the Data,strtotime and three functions are implemented, there is a need for friends to refer to.
This is the example that needs to be told today.
PHP calculates the number of days for date difference instance analysis and number of days for instance analysis. Example of calculating the number of days of a date difference in PHP. This article is for your reference. The details are as follows:
This article introduces you to the protected and const attribute usages of classes and objects in PHP, as well as references for friends who need to know.
Const propertyThe field defined with the const attribute is a constant, and the constant in
For questions about the smarty is_cached () method, please help me. I am very grateful. fatal error: Uncaught --> Smarty: Smarty-> is_cached () undefined method
Today, if (! Is_cached ("var.html", $ _ SERVER ["REQUEST_URI"]) {
Echo "today is
Http://www.linji.cn/1103.htm
Function
In PHP, allow programmers to organize commonly used processes or data components into a fixed format. That is to say, users can combine their own letters or objects.
Functions in PHP are the same as C functions,
Shell script programming and file system RepairGuideThe Linux Foundation has initiated the LFCS certification (Linux Foundation Certification System Administrator) Linux Foundation Certified Sysadmin, which is a brand new certification system, the
I. wildcard characters
* Represents any character ranging from 0 to infinite.
Example: Find the file name starting with cron under/etc/
[Root @ instructor Desktop] # ls/etc/cron *
/Etc/cron. deny/etc/crontab
/Etc/cron. d:
0 hourly raid-check
The cluster space has been a little tight recently and is always worried about space shortage and crashes. The recent resizing is not realistic. After communicating with cluster users, we found that the cluster stores a lot of useless historical
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.