number.
Summary:Y indicates that the year can be in uppercase or lowercase y;Indicates that the month can be written in uppercase letters (F), uppercase letters (M), lowercase letters (m), and lowercase letters (n );Indicates the date suffix.
2, hour: minute: Second
By default, PHP interprets the display time as "Greenwich Mean Time", which is 8 hours different from our local time.
The code is as follows:
The shell can often be seen: >/dev/null 2>1The result of the command can be defined in the form of a%> output/dev/null represents an empty device fileWhere does the > delegate redirect to, for example: echo "123" >/home/123.txt1 means stdout standard output, the system default is 1, so ">/dev/null" is equivalent to "1>
Transfer from http://blog.chinaunix.net/uid-25100840-id-3271224.html a few days ago interview has such a question, more strange: Explain the meaning of >/dev/null 2>1: I was scratching, also did not think out, wrote a clear buffer, hehe online search, as follows: http://wangqiaowqo.iteye.com/blog/1354226 but I only looked at the following paragraph, the back did not see {shell may often see: >/dev/null
Parameter description
1:$# indicates the number of incoming arguments executed by the script
2:$* indicates that the execute script passes in the argument list
3:$$ represents the Process ID
4:$@ indicates that the execute script passed in all parameters
5:$0 to execute script name
6:$1 represents the first parameter
7:$
Parameter description1:$# indicates the number of arguments passed into the script2:$* indicates the execution of a script passed in the parameter list3:$$ represents the Process ID4:[email protected] means that the execution script passes all parameters5:$0 represents the execution script name6:$1 represents the first parameter7:$2 represents the second argument8:$? Indicates script execution status 0 Norm
* FROM employees", $ db );Echo "Echo "While ($ myrow = mysql_fetch_row ($ result )){Printf ("}Echo "Include ("footer. inc ");?>
See what happened? The content in the header file is merged into the program, and PHP executes all the code. Note how $ title is defined before the header file contains header. inc. The code in header. inc can access its value. In this
when the second error message is inserted into the database.The number of times has been more than once;If ($ row ['login _ times ']> 2 ){$ Current = time ();$ Passed_time = $ current-$ row ['login _ date'];Echo '. $ passed_time.' Second // Set the time to 900 seconds. During this period, a specific user cannot log on to the system.If ($ current-$ row ['login _ date']) // $ Test_pw = substr (md5 (rand (),
= array ("Fruits" => array ("a" => "orange", "B" => "banana", "c" => "apple "),"Numbers" => array (1, 2, 3, 4, 5, 6 ),"Holes" => array ("first", 5 => "second", "third "));ReferenceList ()
Array_walkAllows the user-defined function to process every element in the array.Syntax: int array_walk (array arr, string func );Return value: integerFunction type: data processingThis function makes arr of each array el
number, two English letters; such as: "th", "nd"T-Specifies the number of days of the month; such as: "28" to "31"U-Total number of secondsW-Number of days of the week, such as: "0" (Sunday) to "6" (Saturday)Y-year, four digits; such as: "1999"Y-year, two digits; such as: "99"Z-the day ordinal of the year; such as: "0" to "365"You can set the displayed content freely, connect the symbol or display position, such as date ("m-d H") or date ("Dmy"). Date processing in PHP > etc
Instance
First look at the Code:Copy codeThe Code is as follows:Class StrictCoordinateClass {Private $ arr = array ('x' => NULL, 'y' => NULL );Function _ construct (){Print "StrictCoordinateClass is being created ";Print "}Function _ destruct (){Print "Print "StrictCoordinateClass is being destroyed ";}Function _ get ($ property){If (array_key_exists ($ property, $ this-> arr )){Return $ this-> arr [$ property];} Else {Print "Error: Can't read a property other than x y \ n ";}}Function _ set ($ property
Page 1 while LOOPIn this lesson, we will continue to use PHP and MySQL to write some simple and useful pages. We started to display the data in the database from the database we created yesterday, but it will be slightly improved.First, we use the following code to query the database content.Copy codeThe Code is as follows:$ Db = mysql_connect ("localhost", "root ");Mysql_select_db ("mydb", $ db );$ Result = mysql_query ("SELECT * FROM employees", $ d
Page 1 while LOOP
In this lesson, we will continue to use PHP and MySQL to write some simple and useful pages. We started to display the data in the database from the database we created yesterday, but it will be slightly improved.
First, we use the following code to query the database content.
Copy codeThe Code is as follows: $ Db = mysql_connect ("localhost", "root ");
Mysql_select_db ("mydb", $ db );
$ Result = mysql_query ("SELECT * FROM employees
>err# cat outa.txt# cat Errls: Unable to access b.txt: No file or directory
See here, friends may find >out 2>err and we mentioned in the beginning of a >/dev/null 2>1 very similar, don't worry, this will be later.Input redirectAfter understanding the output redirection, it is much easier to understand the input redirection. The basic commands for inpu
Add all *. hlp files from the current folder to the compressed file help.rar.Winrar a help *. hlpYou can use the-z Winrar c -zinfo.txt dummyIn this way, we can use the php Tutorial to call cmd and run the above two winrar parameters to modify the comments of the rarfile in batches and add the files of the compressed package. note that cmd cannot be called directly When php is enabled in safe mode.All scripts are in the same directory as 1.php.$ Id = $
Today, I got to the next level... first write one: (numbers are added)Copy codeThe Code is as follows:$ A = "10"; // connect "to the left$ A + = "2"; // Add "on the right" to the leftEcho $. "?>In my opinion, php statements focus on the concept of line. Whatever $ a represents, it generally means connecting to the right. "connecting to" or "adding" or "Reducing ,! It is not just a combination of numbers. Other methods are also supported.Write another
'); // The default error handling method of the called system. You can also use a custom processor.}// Custom processor, same as aboveFunction myerror ($ error_level, $ error_message ){Echo 'error text ';}// At the same time, you need to change the default processing function of the system.Set_error_handler ('myerror', E_USER_WARNING); // same as above, the first parameter is the name of the custom function, and the second parameter is the error level
, same as abovefunction Myerror ($error _level, $error _message) {Echo ' Error text ';}Also need to change the system default handler functionSet_error_handler (' Myerror ', e_user_warning); The first argument is the name of the custom function, and the second is the error level. The error level here is usually the following three: E_user_warning, E_user _error, E_user_notice "Now you can use Trigger_error to work with custom error-handling functions.
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.