This article describes the method that PHP recursively calls to delete an array of null-value elements. Share to everyone for your reference. Specifically as follows:
The function can delete all null-value elements in an array, including empty
PHP rules that start with two underscores (__) are reserved as magic methods, so it is recommended that you do not start with a function name unless you are trying to overload an existing magic method.
The Magic Methods in PHP are: __construct,
The data table structure of level Two classification is as follows:
The PHP code is as follows
Copy Code code as follows:
/**
@ article classification with two-level classification
@ param int $rootnum--Number of first class categories
Copy Code code as follows:
Yum-y Install OpenSSL
/usr/local/bin/is the installation directory for PHP
Switch to the Etx/openssl directory of the PHP installation directory
Cd/root/soft/php-5.2.8/ext/openssl
Copy Code code as
First look at the code
Copy Code code as follows:
?
function Deldir ($dir) {
Delete the files in the directory first:
$DH =opendir ($dir);
while ($file =readdir ($DH)) {
if ($file!= "." && $file!= "...") {
$fullpath =
Although you can set the error display to hide the hint, but there are also hidden dangers, that is, in the log of the server will be recorded in these prompts, resulting in unusually large log files.
First of all, this is not a mistake, it is
1. Preg_replace ()
$msg = Preg_replace ("/ and the middle part
$msg = Preg_replace ("/]+>/", "", $msg); -----is to delete <> and middle content
I (pcre_caseless)
If you set this modifier, the characters in the pattern will match both the
A local server that does not send mail is a good choice to send mail with a ready-made SMTP server, the tool used here is Phpmailer (Version 5.2.0), and the SMTP server chooses Gmail and 163.
1. Use Gmail to send the script
Include
This article illustrates how to convert a PHP image into an ASCII code. Share to everyone for your reference. Specifically as follows:
PHP image converted to ASCII, after conversion can be directly through the string display picture
Do you use Is_file or file_exists to determine whether a file exists?
In writing procedures found in the determination of the existence of documents, there are two ways to write, some people used is_file, some people use file_exists, which better
There are a number of ways to get random, unique hash values on the web, but much the same:
1, first get the random unique string2, Carry on MD5 or SHA1 calculate hash value
A project to use the hash value, went online to find, but found that PHP
The example in this article describes the method that PHP recursively calls an array value and executes the specified function. Share to everyone for your reference. The specific analysis is as follows:
The following is the WordPress original code,
1, each page must open session_start () to use the session in each page.
2, Session_Start () initialization session, the first access will generate a unique conversation ID saved on the client (is based on cookies saved), the next time the user
First, basic knowledge
This chapter briefly describes the internal mechanisms of some Zend engines, which are closely related to extensions and can help us write more efficient PHP code.
Storage of 1.1 PHP variables
1.1.1 Zval Structure
Zend uses
Unable to load mcrypt extension, Please check the PHP configuration
The following conditions may cause you to run the phpMyAdmin program prompt "Cannot load mcrypt extensions, Check the PHP configuration" error prompt
1, does not install the
All right, the parent class postparent is defined as an abstraction, and the subclass must implement the Buildhtml () method, which does not have curly braces, and if there is no content, it will be an error.
Now the more I think this code is
CodeIgniter (CI, official website and China Station) is a popular PHP framework, compact but powerful, simple lightweight at the same time have a good scalability, at home is also relatively popular. CI, on the other hand, has not been with the
PHP Concise function
Topic: Class of bacteria-like PHP concise function
Brief introduction: PHP simple and clear function syntax
For the crowd: interested in the open source community, interested in PHP, have a little time to understand the
This example describes how PHP uses Numberformatter to format money. Share to everyone for your reference. The implementation methods are as follows:
$amount = ' 12345.67 ';
$formatter = new Numberformatter (' EN_GB ', numberformatter::currency)
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