Seven Habits of writing secure PHP applications are analyzed in depth. When talking about security issues, you must note that in addition to the actual platform and operating system security issues, you also need to ensure that you write secure
Use php to generate a zip compressed file. the code is as follows:
Require_once ". /include/zip. php "; $ zip = new PHPZip (); // $ zip-> createZip (" directory address of the folder to be compressed "," zip file name .zip "); // only generate
Explore the differences between this, self, and parent in PHP. One of the differences between this, self and parent in {1} PHP this article object-oriented programming (OOP, ObjectOrientedProgramming) has become a basic skill for programmers. Using
Describes how to configure fckeditor in Php. FCKeidtor is a foreign multi-language editor. you can make simple modifications to its configuration file to support the applications of commonly used Web development languages. next I will talk about the
$ _ GET [goods_id] + 0 usage details. Purpose: to prevent SQL injection, tid and goods_id are all positive integers? The principle of tid1or1: no matter how sinister your parameters are, + 0 is always honest
Purpose:To prevent SQL injection, tid
Go deep into the details of using double equals () in PHP with caution. PHP comparison operators appear too frequently, especially if (AB) {dosomething}. however, do you really understand it? Details are important! Let's take a look at the following
Use session to determine user logon permissions (ultra-simple ). The copy code is as follows: formaction # methodpost username: inputtypetextnameuserbr password: inputtypepasswordnamepwdbrinputtypesubmitnamesbum:
The code is as follows:
User
Go deep into PHP to get random numbers and letters. The first method is to copy the code as follows :? Php $ FileYmd-His).-. rand (100,999); $ FileID is a random number like 20100903-132121-908? Method 2 copy the code
Method 1
The code is as
Use cookies to count the number of visits. Copy the code as follows :? Php $ _ COOKIE [counter]? ($ C $ _ COOKIE [counter] + 1) :( $ c1); setCookie (counter, $ c, time () + 60); welcome to echob. fontcolor # ff0000. $ c. font access
The code is as
Three methods for PHP to output XML to the page are described in detail. Method 1: Copy the code as follows :? Phpheader (Content-type: textxml); echo? Xmlversion1.0encodingUTF-8 ?; Echousers; echouser; echoname; small echo
Method 1:
The code is as
Deep understanding: single entry, MVC, ORM, CURD, ActiveRecord concepts. MVCMVC is a design model that forcibly separates the input, processing, and output of an application. MVC applications are divided into three core components: Model (M), View
Describes the parameters of the PHP call time format. 1. call the syntax to use date () to obtain the current time format. for example, 2. set the time format parameter in the preceding syntax, "Y-m-dH: I: s ", the displayed format is year-month-day
Based on the security protection knowledge in PHP development. PHP code security and XSS, SQL injection, and so on are very useful for the security of various types of websites, especially UGC (UserGeneratedContent) websites, forums, and e-commerce
PHP uses DES for encryption and decryption. DES is a standard data encryption algorithm. for details about this algorithm, refer to wiki and Baidu Encyclopedia: wiki encyclopedia Baidu Encyclopedia php has an extension that supports DES encryption
A detailed description of common php self-built functions in some php projects. The following php functions are the most commonly used project development functions of it power. these functions are used in many projects and are also quite common. 1.
For in-depth analysis, use mysql_fetch_object () to return the query results in the form of objects. Mysql_fetch_object () is also used to obtain the query data result set, return data of the current row, and automatically slide down the next row.
Php file-based operations. Knowledge Point introduction: 1. determine whether a file or directory has a bool copy code: file_exists (stringfilename) 2. obtain the file name Copy code as follows: basename (filepath) 3
Knowledge Point introduction:1.
Go deep into the phpvar_dump () function. The phpvar_dump function is used to determine the type and length of a variable and output the value of the variable. if the variable has a value, the value of the variable is returned to the data type.
The usage examples of _ get () and _ set () in PHP are described in detail. Php object-oriented _ get (), _ set () usage generally defines the class attribute as private, which is more in line with the actual logic. However, read and assign values
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