PHP coding specification (6 ). 4.2 Single line comment short comments can be displayed in one line and have the same indentation level as the subsequent code. If a comment cannot be written in a row, block comment should be used. Single row note
4.2
Water and Fire are also compatible! Cleverly configure the PHP debugging environment in IIS. The built-in Internet Information Service (IIS) in Windows has good support for ASP, so it is very convenient to debug ASP web pages in IIS. However, some
PHP coding specification (24 ). 9.3.1 parentheses are a good method to avoid operator priority problems by using parentheses in expressions containing multiple operators. Even if the operator priority is possible for you
9.3.1 parentheses
PHP coding specification (3 ). 3.2 The import statement should be in the header of the file, and the role of the file should be described during the import. For example: database operation class require ("db. php"); 3.3 class declaration Class 1
3.2
PHP coding specification (4 ). 3.4 indentation four spaces are often used as a unit of indentation. The exact description of indentation is not specified in detail (space vs. tab ). A tab is equal to eight spaces (not four ),
3.4 indent layout
PHP coding specification (13 ). 6.3 return statement a return statement with a return value does not use parentheses () unless they make the return value more explicit in some way. Example: return; returnmyDisk. size (); return ($ si
6.3 Return
PHP coding specification (23 ). 9.1 constants are numeric constants in the for loop that act as counter values. except for-and 1, they should not be directly written into code. 9.2 assign a value to a variable to avoid assigning the same value to
Php judges the code of an empty array program. Many of my friends asked me how to judge the php empty array. I will summarize some common code used to judge the empty array program. if you need to know it, please refer to it. Empty function, this is
This example describes how to buffer and compress PHP dynamic content. PHP4 uses a buffer mechanism. Before you decide to send a message, all content is stored in the buffer, rather than directly sent to the browser, although you can use the header
Reprinted: comments of httpd. conf file of ApacheServer. Here we refer to ApacheServer1_3_12_win32. ServerTypestandalone # set whether the server is started independently (standalone) or by the inetd of the interconnected network servo program. here
Php filters dangerous code submitted by forms (prevents php injection ). If the security of form submission is poor, it is easy to attack the website because of this form submission. here I will share two examples of dangerous code commonly used php
Php array file writing method. A var_export function is provided for us in php, which can directly import php code into a file. Copy the following code to var_export ($ times, true). if it is not added with true, it cannot be written. in php, a
PHP $ _ REQUEST array security risks. We all know that using $ _ REQUEST directly saves the need to judge post and get some code, which is easier to use. However, if we want to think about it in detail, we will think that $ _ REQUEST is terrible.
Php website protection against traffic flooding attacks. Traffic attacks are a relatively primitive method of website attacks, that is, they constantly refresh the website, resulting in the server being unable to handle or the database being
Disable some dangerous php functions using php. ini. Many functions in php have not been used for many times, and there are great security problems with the website. below we use PHP. in ini, there is a disable_functions switch option to shut down
Php Security Configuration method. PHP itself has some problems with the old version, such as some serious bugs before php4.3.10 and php5.0.3, so we recommend that you use the new version. In addition, the popular SQLInjection PHP version has some
Function for generating random strings in php. This article describes the function for generating random encryption in php. if you need it, you can refer to it. it is a custom function that is not provided by the system. The code is as follows: Copy
Php is an effective way to prevent SQL injection. To ensure data security and prevent injection of strings that need to be filtered out by $ _ GET, I also wrote the filter function at the beginning. later I saw a filter function provided by the php
PHPSQL injection prevention and attack technology implementation and methods (14 ). Php Tutorial SQL Injection Prevention and attack technology implementation and method 1. php configuration file php. magic_quotes_gpc option in ini is not enabled
Php Security Configuration (12 ). (1) open the php Tutorial security mode. The php Security mode is a very important embedded security mechanism that can control some php functions, such as system (), also put a lot of file operation letter (1) open
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