1. Client page with Ajax technology request serverAdvantages:The simplest and quickest is to embed an AJAX call in the HTML code returned to the client, or embed an IMG tag, which points to the time-consuming script to execute.
Disadvantages:In
Xhprof is a PHP performance testing tool that is open source for Facebook, and it can also be called the Profile tool, a word that doesn't know how to translate. There are many similarities compared to the xdebug that have been used before.
PHP is a fast, reliable, cross-platform application, open source code, and so on, making PHP one of the most popular server-side script languages. I based on my experience in the work, to introduce you to the use of PHP experience, I hope to be
Vc6:legacy Visual Studio 6 compiler is compiled with this compiler.
Vc9:visual Studio compiler, is compiled with Microsoft's vs Editor.
Since apache.org only provides VC6 versions, only VC6 can be used when using the original Apache.
You need to get the number of records for a MySQL query that meets the criteria when you need to output a site user registration or if you want to determine if there are duplicate records before inserting the data.
First method: direct statistics
Installation (fastcgi mode), there are often such a command:/usr/local/webserver/php/bin/phpize
What does Phpize do?What is Phpize? PHP Official Description:
http://php.net/manual/en/install.pecl.phpize.php
Phpize is used to extend the PHP
Thinkphp has the effect of debugging running state:
process:0.2463s (load:0.0003s init:0.0010s exec:0.1095s template:0.1355s) | Db:13 Queries 0 writes| Cache:2 gets,0 writes| usemem:415 kb| loadfile:20| callfun:63,1370
Meaning of the
JSON is often used when we implement certain functions in conjunction with PHP and JavaScript. JSON is a data format of JS, can be directly parsed by JS. PHP cannot read JSON data directly, but PHP provides the Json_decode function to convert JSON
PHP Mt_srand sowing a better random number generator seedMt_srand(PHP 3 >= 3.0.6, PHP 4, PHP 5)
Mt_srand--Sowing a better random number generator seed
description
Copy CodeThe code is as follows:
void Mt_srand (int seed)
Use seed to sow the random
PHP Unlimited classification, Google will be able to find a lot of relevant information, thinking compared to wind, but also used more is the classification table at least id,pid,name three fields, ID self-added table classification, PID for the
Copy CodeThe code is as follows:
function Deldir ($dir) {
Delete the files in the directory first:
$DH =opendir ($dir);
while ($file =readdir ($DH)) {
if ($file! = "." && $file! = "...") {
$fullpath = $dir. " /". $file;
if (!is_dir ($fullpath))
Curl is a very powerful feature in PHP, and every PHP programmer should learn and become familiar with curl, making sure your php_curl extension is turned on before using curl.
One, Curl useFor example: We collect the first page of PHP recruitment
Header Common DirectivesThe header is divided into three parts:The first part is the version of the HTTP Protocol (http-version);
The second part is state code (status);
The third part is the reason phrase (reason-phrase).
Fix 404 Pages: Use this
The cookie cannot be stored in an array by default, so the following notation is incorrect.
The error is as follows:Warning:setcookie () expects parameter 2 to is string, array given in
But PHP can parse the array with the same name and the cookie
We know that if the password is hashed directly, then the hacker can get a hash value by obtaining this password, and then by checking the hash value dictionary (for example, MD5 password cracking site), the password of a user.
Adding salt can
Copy CodeThe code is as follows:
$_cookie["Counter"]? ($c =$_cookie["Counter"]+1):($c =1);
Setcookie ("Counter", $c, Time () +60);
echo "
Welcome to the section ".". $c. " Second Access Cookie";
?>
In this application, the browser is the first to
The code looks like this:
Copy CodeThe code is as follows:
/*
[discuz!] (C) 2001-2009 Comsenz Inc.
This is a freeware, the use is subject to license terms
$Id: security.inc.php 16688 2008-11-14 06:41:07z cnteacher $
*/
//If the in_discuz 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