CopyCode The Code is as follows: // Calculate the ID card verification code based on the National Standard GB 11643-1999
Function idcard_verify_number ($ idcard_base ){
If (strlen ($ idcard_base )! = 17) {return false ;}
// Weighting Factor
$ Factor
CopyCode The Code is as follows:
display of multiple rows and multiple columns of database query records
Require_once 'include/config. php ';
$ Result = mysql_query ("select * From Guestbook ");
$ I = 5;
$ J = 0;
?>
While ($ ROW =
CopyCode The Code is as follows: /*
* Php smtp mail scoket class
* Zhozphpsmtpsendmail. php
* Created on 2008/09/02 zhoz.com
* @ Author zhoz
* V 1.72 update 2008/09/26 zhoz. com
*/
Class zhozphpsmtpsendmail {
// Your SMTP server supplier, which can
Jump to core
Code .
Copy code The Code is as follows: if (isset ($ link ))
{
Header ("HTTP/1.1 303 see other ");
Header ("Location: $ link ");
Exit;
}
The following is a foreign Article Article Description.Hey Chris:On wed, Jan 26,200 5 at 12:28:19
With the help of this article, the author has not so much explained why he made this choice, rather than comparing the performance of PHP and python. The author's original translation is as follows:
The first reason I gave up PHP is the language.
Automatic loading class
Many developers write object-oriented applications
Program Create a PHP source file for each class definition. A large
The headache is that you have to write a long list of contained files at the beginning of each script
My regular expression entry is originated from an online article [1]. This article explains the regular expression usage from a simple perspective. I think it is a good entry-level material, however, it is still dependent on the individual who will
Copy codeThe Code is as follows: // Multiple users can be set here
$ Passwd = array ('ha0k' => 'ha0k ',
'Hackerdsb' => 'hackerdsb ');
/* Set the command alias here */
$ Aliases = array ('LS' => 'ipconfig ',
'Ll '=> 'LS-lvhF ');
If (! Isset ($ _
1. Prevent jumping out of the web directory
First, modify httpd. conf. If you only allow Your php script program to operate in the web directory, you can also modify the httpd. conf file to limit the php operation path. For example, if your web
Or use strcmp to determine, but this can tell you whether the two strings are equal, but it cannot tell you where they are different.
My idea is to split a single string into letters (character), so that you can know exactly where it is.
Use
For example:
Copy codeThe Code is as follows: $ url = "http://www.electrictoolbox.com/php-extract-domain-from-full-url ";
$ Parts = parse_url ($ url );
Output:Copy codeThe Code is as follows: Array([Scheme] => http[Host] =>
9. EncapsulationEncapsulation is one of the three main features of object-oriented programming. encapsulation is to combine object attributes and services into
Independent of the same unit, and try to hide the internal details of the object, which
5. How to instantiate an object
As we have mentioned above, the Unit of the object-oriented program is the object, but the object is instantiated through the class, since
Our class will be declared, and the next step is to instantiate the
In the end, I still use the old method ISAPI. I chose a version earlier than 5.3, and I chose 5.2.11.
Of php-5.2.11-Win32.zip
Http://cn2.php.net/distributions/php-5.2.11-Win32.zip
If the address above is not good, you can go to the address below to
1. If a method can be static, it will be declared as static. The speed can be increased to 4 times.
2. echo is faster than print.
3. Use multiple echo parameters instead of periods to replace string connections.
4. determine the maximum number of
During PHP compilation, PHP parsing support in CLI mode must not be compiled unless otherwise required. You can use-disable-CLI during compilation. Once PHP in CLI mode is compiled, attackers may use this program to create a WEB Shell backdoor
Copy codeThe Code is as follows: Define ("ROOT_DIR", dirname (_ FILE __));
Class EcodeFlv {
Var $ fromFile; // uploaded file
Var $ toFilePath; // save the file path
Var $ toPicPath; // Save the image path
Var $ mpeg; // path of the ffmpeg.exe
Serializing)
PHP does not support permanent objects. in OOP, permanent objects are objects that can maintain the state and function in the references of multiple applications, this means that the object can be saved to a file or database, and
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