To traverse all the directories in a folder, list all the files inside, PHP itself has a readdir function, but only the current directory, according to this function, I wrote another function to achieve my needs.
The code is as follows
In PHP to provide us with a few character interception functions, including substr,mb_substr,mb_strcut function, some of us PHP beginners will use substr to intercept Chinese, the results found that Chinese will have garbled, garbled we can use the
For most password encryption, we can use MD5, SHA1 and other methods. Can effectively prevent data breaches, but these methods apply only to data encryption that does not need to be restored.
For information that needs to be restored, a reversible
Copy CodeThe code is as follows:
if (isset ($_get["se"])) {
$se = $_get["se"];
}else{
Return
}
if (!empty ($se)) {
Echo ("Receive SE:". $se. "
"); The accepted session is $se.
session_id ($SE); Set $se bit session_id
Session_Start (); Open
Class Concept: A class is a collection of objects that have the same properties and operations. It provides a uniform abstract description of all objects that belong to the class, including properties and operations in two main parts. In an
PHP has a very rich built-in function, many of which we have used, but still have a lot of functions we are not familiar with, but they are very useful. In this article, I've listed some little-known PHP functions that will make your eyes
Shopping Cart Implementation methods are the most commonly used in several ways, cookie,session and save records to the database, let me introduce the simplest way to use cookies as a shopping cart product record repository.
PHP Shopping Cart, there
If you do the site has a membership system that must be automatically recover password function, that is, forget the password function, if the user forgot password can be directly through the mailbox or mobile phone number to retrieve the password,
The bitwise and mainly is the binary number operation.
The code is as follows:
Copy CodeThe code is as follows:
$a = 1;
$b = 2;
$c = $a ^b;
echo $c//3
?>
This is not a purely additive relationship.
Decimal 1 converted to binary 00000001
Decimal
Calculate the time difference our principle is according to the definition 1, the year is 360 days, one months is 30 days; 2, 86400=24*60*60 in the code, representing how many seconds a day the CCP has, so it can be calculated.
The effect is as
We sometimes encounter situations where downloading a PDF file without processing will open the PDF file directly in the browser and then save the download file by saving it. This article will be done by PHP to download PDF files
This article mainly introduces the THINKPHP3 query MSSQL database garbled solution, the need for friends can refer to the next
thinkphp Query MSSQL Database garbled reason is thinkphp default is UTF-8, and Msmsql database is Simplified Chinese
In PHP, the underlying implementation of an array is a hash table, all in the form of Key-value. In PHP's Zend engine, there is a dedicated API for working with hash tables for different hash table operations.
Creation
For a hash table, each
In web page development to prevent duplicate submissions is a more practical and commonly encountered problems, in addition to our database can directly query whether users submit the same data for filtering, we can also when users submit data to
Recently to develop a permission function, I hope that users in the background to choose a set of permissions will generate a PHP file corresponding to the user, so as long as the user login I will load the corresponding configuration file, here we
I will see a PHP tube in the PHP version of A, None-thread safe and the Thread safe version, then what is the difference between the two versions, but a closer look at the introduction is to establish that we use thread-safe, rather than a wire
Start using the following jump:echo "";Alert inside is a hint of the message, href is prompted to jump after the page.Then I thought of a redirect () redirection method in the TP framework and went to see it.However, the TP comes with not a popup
For most password encryption, we can use MD5, SHA1 and other methods. Can effectively prevent data breaches, but these methods apply only to data encryption that does not need to be restored.
For information that needs to be restored, a reversible
In PHP file upload we need to get the file name suffix after the simple file type judgment, and in PHP, the file name suffix is very simple and there are many kinds, let me summarize below.
1.basename ()-Returns the file name of the path
Take a look
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