1, if the method of the class can be defined as static, as far as possible to define as static, it will increase the speed of nearly 4 times times.
2. The speed of $row [' ID '] is 7 times times that of $row[id].
3. Echo is faster than print, and
When using thinkphp to do tags tags, there is a problem, is to get parameters, but can not find the corresponding results. View database discovery data is present. What's the problem?
Calls that are shaped like
Sometimes in order to achieve a certain purpose, we need to sort the two-dimensional array, and now share the method of its implementation.
Copy CodeThe code is as follows:
$arr =array (
' 1 ' = = Array (' Date ' = ' 2011-08-18 ', ' num ' = 5),
' 2
Here's a look at the effect:
Now let's take a look at the PHP codeCopy CodeThe code is as follows: Session_Start ();function Random ($len) {$srcstr = "1A2S3D4F5G6HJ8K9QWERTYUPZXCVBNM";Mt_srand ();$strs = "";for ($i = 0; $i $strs. = $srcstr [Mt_rand
Phpmailer is a packaged PHP mail sending class, support for sending HTML content of e-mail, and can add attachments to send, not like the php itself mail () function requires server environment support, you only need to set up the mail server with
Example 1, PHP's own function can remove/delete the HTML tag/code in the string.
Strip_tags (String,allow): The function strips HTML, XML, and PHP tags.
Parameters: String, required, specifies the string to check, allow, optional, specify the
PHP about the form to submit special character processing method to do a summary, mainly related to Htmlspecialchars/addslashes/stripslashes/strip_tags/mysql_real_escape_ A number of functions such as String are used together to communicate with
Using PHP for two days Snoopy this class, found very useful. Get all the links in the request page, use Fetchlinks directly, get all the text information using Fetchtext (which is handled internally or using regular expressions), and more features
Controller inside: ElseIf (! $model->validatepassword ($data->password))
Copy the Code code as follows:
Class Xbasemodel extends Cactiverecord{/*** User Password detection** @return Boolean*/Public Function ValidatePassword ($password){return
The PHP Setcookie () function sends an HTTP cookie to the client. A cookie is a variable that is sent to the browser by the server. A cookie is usually a small text file that the server embeds into a user's computer. This cookie is sent whenever the
MCrypt Brief Introduction
PHP Programmers in the code program, in addition to ensure the high performance of the code, there is one thing is very important, that is the security of the program. In addition to several cryptographic functions, PHP
When using PHP to do something, found a problem, can be easily attributed to the problem of garbled, but this problem is not the function itself caused. To see who the culprit is.
Suspects: Base64_encode and Base64_decode
Crime: I wrote a jump and
In the actual use of destoon in the process we often need to build some of the system does not have a module, this time we need to copy the existing modules to build a new module according to the existing module, the specific operation method is as
PHP has a configuration option called Allow_url_fopen, which is a valid option by default. It allows you to point to many types of resources and handle them like local files. For example, by reading the URL you can get the content of a page (HTML),
18. Fleet Activities (flyingfleethandler.php)
In the previous article, we had a preliminary study of the source of the fleet activity, mentioned the triggering of the fleet activity. Now I'm going to analyze the fleet activity in Xnova, which is
Financial people have encountered such a problem, such as 13,126.8 Yuan, in the invoice or other bookkeeping business, generally use uppercase to spell "one Wan bai Lu Yuan ba corner of the whole".
This is not, also affixed to my original in the
First, the basic knowledge
1. Type of mobile app
There are several applications for mobile: Webapp,nativeapp,hybridapp.WebApp is a mobile website that needs to be accessed using a mobile browser.Nativeapp is developed in native language and users
PHP reads Excel, and the PHP package folder is a zip file,
1. Download the files locally and place them in Apache environment2.D.XLSX is a game server name and player list, this program is only suitable for this type of XLSX file structure, other
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