For their own shortcomings and deepen the understanding of PHP, choose to use PHP to study various design patterns.
Today I saw the introduction of design patterns, and learned the factory model, because the factory model is relatively simple, but
Objective
Reflecting on some of the things that have been written recently, some little feelings
For coder who have studied Java or C + +,
The old grammar doesn't mean anything, OOP, the technology of exception
Not to look at the simple instance
Two first-choice control auto-escape in php.ini
MAGIC_QUOTES_GPC: Auto-escape get/post/cookies magic_quotes_runtime: automatically escaped SQL
Today, when using Json_decode, you should add a slash "\" to all the double quotes in the JSON.
The
What you need to learn:
1. PHP Regular
2. PHP design mode
3. mysql Slow query
4. http1.1 protocol status word meaning, such as 101,202,301,404,502
5. Linux command: DU/DF/WC/LN, etc.
6. SVN-related commands under Linux
7. Architecture Topics:
Computer language learning is important is the practice process, if only to see, will feel very simple but to you really write a piece of code when you will find that you learn is God horse things ah! So learn the language to constantly knock knock
Introduction: This is a detailed page of socket_read problems in PHP, introduced and PHP, related knowledge, skills, experience, and some PHP source code.
class= ' pingjiaf ' frameborder= ' 0 ' src= ' http://biancheng.dnbcw.info/pingjia.php?id=323994
Introduction: This is a detailed page of PHP coherent interface, introduced and PHP, related knowledge, skills, experience, and some PHP source code and so on.
class= ' pingjiaf ' frameborder= ' 0 ' src= ' http://biancheng.dnbcw.info/pingjia.php?id=3
Introduction: This is a detailed page of PHP change variables, introduced and PHP, related knowledge, skills, experience, and some PHP source code.
class= ' pingjiaf ' frameborder= ' 0 ' src= ' http://biancheng.dnbcw.info/pingjia.php?id=326449 '
Front-end time on the internet to see the example of Erlang connection php-fpm, I followed to get a bit, the following to my debugging code after the post
I fixed 2 bugs in the original code:
1, parameter more than 128 characters error
2. Error
http://a.liao1.com/sherry/auto/test.php
Get domain name or host addressecho $_server[' Http_host ']. "";//a.liao1.com
Get web Addressecho $_server[' php_self ']. "";//sherry/auto/test.php
Get URL parametersecho $_server["Query_string"]. "";
For images uploaded on the front-end of a Web site, it is necessary to scale them in the background to produce a uniform size thumbnail image. In PHP, it is convenient to use the GD library to accomplish this task. The following static method of the
PHP with memcached is already a standard for including women. Again, it seems to make people feel too "?" , but there are some details not everyone is clear, such as pecl there are two memcached modules, Memcache and memcached, most of the current
1. First understand the limit usage in SQL statements
SELECT * FROM table ... limit start position, number of operation bars (where starting position is starting from 0)
Example:
Take the first 20 records: SELECT * from Table ... limit 0, 20
One, the coding range
1. GBK (gb2312/gb18030)
\x00-\xff GBK Double byte encoding range
\x20-\x7f ASCII
\xa1-\xff Chinese
\x80-\xff Chinese
2. UTF-8 (Unicode)\U4E00-\U9FA5 (English)\x3130-\x318f (Korean\XAC00-\XD7A3 (Korean)\u0800-\u4e00
PHP Magic function
Class person{private $name; Private $age; Private $sex; Public function __construct ($name, $age, $sex) {$this->name= $name; $this->age= $age; $this->sex= $sex; Public Function __get ($property)
Define and use the Strip_tags () function to strip HTML, XML, and PHP tags.
Edit this paragraph syntax
Strip_tags (String,allow)
Parameters
Describe
String
Necessary. Specifies the string to
See a Magic variable today, is not seen before, __dir__, I checked, found that the original is php5.3 new, by the way a few examples, explain the PHP magic variable
1:__file__
The full path and file name of the file. If used in the included file,
/*
This article provides three file download code two is to support the local server file download, another support download remote server file download to local OH.
*/
function Download ($file _dir, $file _name)
Parameter description:
File_dir:
PHP is not suitable for a resident shell process in many cases, he does not have a dedicated GC routine, and does not have an effective memory management approach. So if you are using PHP as a resident shell, you will often be unhappy by memory
1, if in the function, we do not want to use a variable, or is the Greek
If you don't use a variable completely, you can use the unset (variable name
), remove the variable completely
$a = 12;
Function ABC ($a) {
unset ($a);
$a = 50;
}
ABC
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