The learning methods for getting started with PHP are different for everyone. the purpose of writing this article is to share your learning process for reference only. do not blindly use others' learning methods, find useful learning methods for
NOTNULL and null not null | NULL: specifies whether the column can be empty. If neither NULL nor not null is specified, the column is considered NULL
In MySQL,
Set a NULL value for a not null field,
It does not make errors,
MySQL automatically
How to improve PHP speed and simple data cache technology
I have been optimizing program performance for a while recently. I have an interesting idea and want to discuss it with you.
Cache is a typical application mode based on the
Use eAccelerator to accelerate PHP code
EAccelerator is really a good thing (its predecessor is truck-mmcache ).
Simply put, it is a cache system that works with PHP (supporting PHP5) and exchanges data through shared memory or disk files.
It is
Five tips for string processing in PHP programming
Note the difference between single quotes and double quotes
Note the use of escape characters \, \ ", \ $
Use octal or hexadecimal characters to represent \ xf6
Echo "H \ xf6me"; // check whether
PHPToken is designed to avoid repeated data submission. check whether an external commit matches the action to be executed. (if multiple logics are implemented on the same page, such as adding, deleting, and modifying them, put them in a php file)
Class structure: there may be three internal elements of the class: constant, property, and method. the function can be understood as a constant outside the class, variables and functions.
The code is as follows:
Class TEST{Const NAME = 'value';
PHP's MD5-encrypted 16-bit and 32-bit implementation code has been found by many people on the Internet. it is correct to find a solution and record it.
The code is as follows:
Echo substr (md5 ("admin"), 8, 16); // 16-bit MD5 encryptionEcho
Gregarius has a good degree of support for Chinese characters. The only drawback is that garbled characters may occur in the date format. In fact, you only need to modify the rss_locale_date method of the util. php file in the root directory to
Some major PHP development frameworks and CMS system platforms have been collected and sorted out. here, we will make a summary, which may be supplemented later. Development Framework
WACT http://wact.sourceforge.net/
The old PHP programming
The following code adds, deletes, and modifies form data in CakePHP. here we declare a point. in the previous example, we accidentally typed the lastupd field in the database table into lastudp. In this example, we will correct it.
Except for the
It took nearly a day to solve the issue of garbled Ajax, MySQL, and ZendFramework. The following is a summary for your reference. Problem:
When Google Map uses Ajax to transmit data to the server in get mode, the server displays garbled URLs,
Zend
PHP is a programming language that is easy to use, easy to learn, and widely available. It is ideal for developing simple scripts that can be used in various games. Whether it's a simple, paper-and pen-based game, a group of people playing complex
You can take a look at several php pen questions from night travelers.
I. basic questions
1. write the output results of the following program
The code is as follows:
$ Str1 = null;$ Str2 = false;Echo $ str1 = $ str2? 'Equality ': 'Unequal ';$
Generally, php collection code can be used. here is a simple implementation code.
The code is as follows:
$ Title = 'foot home ';$ Hello = 'jb51. net! ';$ File = file_get_contents ('http: // www.baidu.com ');$ File = iconv ("gbk // IGNORE", "UTF-
Some of the following uses have never been seen by a considerable number of PHP enthusiasts. What are these things? We often see many strange PHP syntaxes in the templates of wordpress blog programs, such:
The code is as follows:
Empty
For
We generally use $ _ SERVER [REMOTE_ADDR] to obtain the user's IP address. after my research, there are two methods to obtain the user's real internet IP address. Generally, $ _ SERVER ['remote _ ADDR '] is used to obtain the user IP
I realized it only today when I read the joomla source code. In the past, this operator can also be used as a non-static method of the category class. It really surprised me. It has always been assumed that the scope parsing operator can only be the
Integer is a number in Z {...,-2,-, 1, 2. Integer can be in decimal, octal, or hexadecimal format.
In octal notation, the number must start with 0 (0;
In hexadecimal notation, the number must begin with 0x (Zero x) or 0X (zero capital X;
Integer
The literal meaning is an undefined index, which is generally caused by the inaccuracy of the developer's judgment. Generally, the running of the program is not affected. for specific solutions, refer. Method 1: if normal execution of the program is
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