Determines whether the directory is empty, true is null, false is not empty function Is_empty_dir ($fp) {$H = @ opendir ($fp), $i =0, while ($_file=readdir ($H)) {$i + +;} Closedir ($H); if ($i >2) {return false;} Else{return true;}}
1. Determine
Using exception mode-pdo::errmode_exception (the error method in capturing SQL statements in PDO three) The exception mode creates a pdoexception and sets the Erorcode property, which encapsulates the execution code into a try{...} Catch{...}
Using exception mode-pdo::errmode_exception (the error method in capturing SQL statements in PDO three) The exception mode creates a pdoexception and sets the Erorcode property, which encapsulates the execution code into a try{...} Catch{...}
This article mainly introduces the spring boot implementation of the mail Registration function sample code, small series feel very good, and now share to everyone, but also for everyone to do a reference. Let's follow the small part together.
We recommend several formatting tools and code conversion tools in our daily work development, most of the time is in the process of writing code, or in our two development process, many times we need to copy and paste code, but sometimes when we
The code is as follows:/* * SUBSTR returns the substring of the string * Base_convert converts a number between any binary * fileperms get permission to file *///gets permission function Getchmod ($filepath) {return Sub STR (Base_convert (@fileperms
The following text: This article mainly introduces the PHP file read and write operation related function Summary, this article summarizes fwrite (), Fread (), fgets (), fgetc (), file (), ReadFile () and other functions of the introduction and use
Definition and Usage file_get_contents () reads the entire file into a string. This function is the preferred method for reading the contents of a file into a string. If supported by the server operating system, memory-mapping techniques are also
How to get the size of the disk partition through the PHP file system function not only can the file system function to the directory, the file operation, but also can obtain the directory, the file related information, then can obtain the disk
The Array_multisort () function in PHP can be used to sort multiple arrays at once, or to sort multidimensional arrays based on one dimension or multidimensional. This article explains how to use the Array_multisort function. The Array_multisort ()
What is the definition and usage of the PHP chdir () function? In PHP, the chdir () function is to change the current directory, what it means is to get the current directory, a directory, your current directory is the Www/index directory, when
Array_keys returns a partial or all of the key names in the array array_keys (array $array [, Mixed $search _value [, bool $strict = false]]) Array_keys () Returns the key name of a number or string in a $array array. If an optional parameter,
Array_key_exists () defines and uses the array_key_exists () function to determine whether a specified key exists in an array, returns TRUE if the key exists, or false otherwise. The syntax array_key_exists (key,array) parameter describes key
The 5 functions that get the intersection have 5 corresponding functions to get the difference set. I am the link. Array_intersect ($arr 1, $arr 2);//Gets the intersection of the array array_intersect_key ($arr 1, $arr 2);//Gets the intersection of
In PHP, the addslashes () function adds a backslash before some of the predefined characters in the input string, and the Stripslashes () function removes the backslash added by the addslashes () function. This article summarizes some of the usage
How to learn PHP Array_fill () define and use the Array_fill () function to populate an array with the given values, the returned array has number elements, and the values are value. The returned array uses a numeric index, starting from the start
In most forums, you can choose when you're logged in, such as saving for one weeks, saving for one months, and so on. You can then set the expiration time of the login via a Cookie. The session failure time setting mainly has the following several
The reverse of the PHP array in an article, "How to sort php arrays," we introduced the sort, asort, and Ksort, which are sorted in ascending order of the array, so if you want to implement the reverse of the arrays? Here's another set of functions
Friends in the process of learning PHP language, will certainly focus on the actual development process of security issues. So, today we're going to show you the first step in ensuring PHP security-validating data. Validation of data is the most
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