As we all know, Json_encode usually escapes the characters in JSON into Unicode, but that's not necessarily what we want. Sometimes we need to get a JSON string in the form of a Chinese character, such as a JSON string that needs to be GBK encoded
This paper analyzes the method of calculating the date difference between days in PHP. Share to everyone for your reference, as follows:
$date_1=date ("y-m-d"), $Date _2= "2018-09-09", $d 1=strtotime ($Date _1), $d 2=strtotime ($Date _2); $Days
This is the use of the QQ website JS to achieve the provincial urban three-level linkage. Reference is very convenient
Front desk:
QQ JS Province Urban three-level linkage
"setup ();p reselect (' Shaanxi province ');p Romptinfo (); ">
SQL language is first a programming language, followed by the query language, it can be stored procedures to achieve complex data operations.
There is a need for a scheduled task, only simple operation of the database, for example, the periodic
1: Modify/usr/local/nginx/conf/ngnix.conf, red font to add content.
#rtmp直播配置server {Listen 1936;Chunk_size 4000;Application Live {Live on;HLS on;
hls_path/usr/local/nginx/html/multimedia/hls/live;
hls_fragment 2s;Hls_playlist_length 6s;}}
server
PHP7 is Vc14 compiled, if you want to run the VC2015 library must be installed first
https://www.microsoft.com/en-us/download/details.aspx?id=48145
Start PHP support in Apache first (Apache needs to download 2.4VC11 version)
Httpd.conf End of
Yii2The default format for returning table name values is
{{%user}}
and
Yii1is returned in the
{{user}}
Look at the source code, found that in
Yii1Of
path\to\yii\framework\db\schema\cdbschema.php line78
if($this->_connection->tablePrefix!=
How the controller module of the thinkphp framework is implemented
Front Controller、
Rear Controller, and how do I implement a method with parameters?
PHP system comes with the Reflectionclass, Reflectionmethod class, can reflect the user custom
In writing a form submission project, encountered the PHP interface output cannot display the Chinese interface.
Later access to relevant information, to obtain a solution.
The code is as follows:
123
PHP is fun! "; echo" Hello world!"Echo"
Realize
The Yii class automatically loads, relies on PHP spl_autoload_register() , registers a self-loading function (autoloader), and inserts it to the top of the auto-load function stack, ensuring that Yii's autoloader is called first.
What is an object
Objects are things, an entity
What is a class
A class is an abstraction, a concept of a kind of thing-
A class is a template for an object that is an instance of a class
What's in the object
Member properties--variables--to
node. JS creates the first app
If we use PHP to write back-end code, we need an Apache or Nginx http server, with MOD_PHP5 modules and php-cgi.
From this perspective, the entire "Receive HTTP request and provide WEB page" requirement does not need
thinkphp Framework Configuration
Download thinkphp framework from official website http://www.thinkphp.cn
Copy the thinkphp file from the downloaded file to the server, and here is an example of the htdocs placed in Mamp
Create a new
node is required for project needs. JS and PHP Do interface calls, found node. JS to Chinese use MD5 encryption and PHP to the Chinese MD5 encryption results are different.
Php
$str = '程序员';echo$str.' md5:'.md5($str);?>
Output:Programmer
List several forgotten in the PHP language but very powerful string processing functions, here is not the use of an example, interested friends can test themselves.
(PHP 4 >= 4.0.4, PHP 5)
Function prototype bool Ctype_alnum (string
/** using the idea of function recursion to create a function to achieve infinite classification of functions * In fact, the f_id parent ID of each data as the root node, the data concatenation, and then the root section * point down to find 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service