1. First introduces WordPress's two powerful plug-ins:
(1) Count per day is a very powerful number of visitors statistics plug-ins, can be counted daily, yesterday, weekly, monthly and so on the number of visitors (based on IP statistics),
PHP gets the first letter of Chinese pinyin
Copy Code code as follows:
function Getinitial ($STR)
{
$asc =ord (substr ($str, 0, 1));
if ($ASC {
if ($asc >=48 && $asc Return ' 1 '; Digital
}elseif ($asc >=65 && $asc return Chr ($ASC);
When installing (fastcgi mode), there is often such a command:
Copy Code code as follows:
/usr/local/webserver/php/bin/phpize
What is phpize for?
What is Phpize?Phpize is used to expand the PHP extension module, through the
php5.3 Self-belt PHP-FPM
Copy Code code as follows:
/usr/local/php/etc/php-fpm.conf
PID = Run/php-fpm.pidPID settings, default in the installation directory of the Var/run/php-fpm.pid, recommended to open
Error_log = Log/php-
Come to the conclusion today.
, when the internal method of a class accesses a property that has been declared as const and static, use the self:: $name form. Note The Const attribute's declaration format, const pi=3.14, not const $PI =3.14
Isset(PHP 3, PHP 4, PHP 5)
Isset--Detects whether a variable is set
DescribeBOOL Isset (mixed var [, mixed Var [, ...]])Returns TRUE if VAR exists, otherwise returns FALSE.
If you have freed a variable using unset (), it will no longer be isset ()
This example describes how PHP uses File_get_content to set header information. Share to everyone for your reference, specific as follows:
Directly on the code:
array (' header ' => ' accept:application/json\r\n ').
"Accept-encoding:gzip,
MD5 Encryption:
String MD5 (string $str [, bool $raw _output = false])
1.MD5 () returns a hash value in 32-character hexadecimal digits by default, it accepts two parameters, the first is the string to be encrypted, the second is a raw_output
When doing development, it is possible to forget some technical details. These details can be very serious consequences, such as the site was injected, the site crashed and so on. Now let's summarize some of the "traps" in PHP that are likely to be
Let me give you an example:
Copy Code code as follows:
$arr = Array (' A ', ' B ', ' C ', ' d ');
Unset ($arr [1]);
Print_r ($arr);
?>
What I thought before was unset, the array $arr should compress the array to fill
A daemon (Daemon) is a special process running in the background. It is independent of the control terminal and periodically performs a task or waits to handle certain occurrences. The daemon is a very useful process. PHP can also implement the
One, the effect chart:
Second, the implementation of the Code
Copy Code code as follows:
Custom Exception functionsSet_exception_handler (' handle_exception ');
Custom error
For HTTP chunked data returned by the WEB server, we might want to get a callback when each chunk returns, rather than all the responses returned. For example, when the server is Icomet.
Use the Curl code in PHP as follows:
However,
PHP processes a large amount of data, each processing a data return client to display the current state of the method.
Similar to dedecms generating static pages
Idea:
1. Client sends request2. Server-side accept request, start to count the
The_post_thumbnailThe_post_thumbnail is mainly used in WordPress to print the thumbnails set in the article, and the Get_the_post_thumbnail function can return the HTML code you need as a string.
The use of The_post_thumbnail functions
This time grabbed 1.1 million of the user data, the data analysis results are as follows:
Pre-development preparation
Install the Linux system (Ubuntu14.04) and install an Ubuntu under the VMware virtual machine;
Install PHP5.6 or above
This article introduces a new way of uploading pictures, using HTML5 filereader to read picture files, and then transfer data to the server and then use PHP to process. The implementation process is as follows (with the picture preview feature)
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