Heredoc Original document and Nowdoc syntax using scene code
Current To-do List
'; foreach ($parent as $task _id = $todo) {echo
$todo EOT; if (Isset ($tasks [$task _id])) {//If the current ID has
MySQL usage in Nodejs
1. Establish database connection: CreateConnection (object) method The method takes an object as a parameter, which has four commonly used property host,user,password,database. Same as the parameters of the linked database in
PHP code
Returns the first day of the specified month function get_the_month_first_day_str ($theyear, $themonth) { return date ("Y-m-d", mktime (0, 0, 0, $themonth, 1, $theyear)); } Returns the last day of the specified month function get_
Today, when writing a PHP script to access the database, it was found that the Chinese string was stored in HTML encoding (such as "Mao" in the text of the HTML encoding "Mao"), so that the field when the conditional query can not be used in Chinese
Redis is a high-performance Key-value database. The emergence of Redis, in some cases can be a good complement to the relational database. On the other hand, in the session storage, there are also many people choose Redis. It is used to compensate
Learn the regular expression of half a year, also can not say always learn it, is and it has been dealing with, how to use regular expression to solve their own problems, and also to consider how to match a large number of text to optimize it.
There was a problem with Php+mysql when you encountered a character disorder, the workaround:
After mysql_connect add a set NAMES UTF8, you can make the database of UTF8 de garbled, for GBK database use set NAMES GBK, the code is as follows:
1
A long time not to update the blog, or feel that the work needs more summary of good. Let's update a question that I think is more accomplished today.
Recently in the storage value settlement, the need to settle the home page needs to be sorted by
1.foreach Label
The foreach label is used for loop output:
foreach (Name,item,key)
Name (required): The data template variable to output
Item (required): Cyclic single primitive variable
Key (optional): Loop key variable, default value is
Element/Code Description
$_server[' php_self '] returns the file name of the current execution script.
$_server[' Gateway_interface ' returns the version of the CGI specification used by the server.
$_server[' server_addr ' returns the IP address
Static variables exist only within the scope of the function, that is, the static variables only live in the stack. General function variables are released after the function ends, such as local variables, but static variables do not. That is, the
PHP line breaks for different systems
The implementation of line breaks between different systems is not the same
Linux and Unix with/n
MAC with/R
Window is/r/n in order to show that it is different from Linux
So the implementation method on
PHP processing session functions 1, Session_Start
function function: Start a session or return a session that already exists.
Function prototype: Boolean session_start (void);
Return Value: Boolean value
Function Description: This function has no
PHP code
An assignment statement; the "Var_dump" function can display the data type of our variables.In the variable, because the variable occupies a different space unit, but also divided into several data types, like the supermarket
In order for the URL to support Chinese, for example, www.xxx.com/Canton/xx need to be in emptyaction to capture the canton/xxxx. However, TP tacitly recognizes that the module name does not support Chinese. Therefore, the PHP core file for the TP
Assignment operation: =, meaning that the value of the right expression is assigned to the operand on the left.
$int 1=10; $int 1= $int 1-6; $int 1=4echo $int 1, ""; $int 3= $int 2= $int 1+4; Right to left, last $int3=8echo $int 2, ""; echo $int 3
Baidu Tutorial, opened the Nginx configuration file, but can not find the https Server, I small white, online and other big God answer
Reply content:
Baidu Tutorial, opened the Nginx configuration file, but can not find the https Server, I
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