About empty ()
Empty () is used to check whether a variable is empty. If the variable is not null or a non-zero value, empty () returns FALSE. In other words, "", 0, "0", NULL, FALSE, array (), var $ var; and objects without any attributes will be
Mysql_pconnect is used to establish a persistent connection between php and mysql. Generally, the execution mode of php is to initialize all resources when the script starts to be executed, and release all resources after the script ends. This is
Encryption and decryption is a common requirement in a system. PHP websites often use encryption and decryption. The following describes a useful encryption and decryption function, which will be used in the future.
'; echo 'decryption :'. encrypt (
After installing PHP5, you will find the following problems:
You may find that the output time is different from the current time.
The reason is that if you do not set the local time zone of your server in the program or configuration file, the
The most common data structure in PHP is an array. Arrays can help us solve a large part of programming problems. In fact, many array operations do not need to be written by ourselves. The system already comes with related functions. Next we will
Sometimes we need to use PHP to delete files and folders. PHP also has functions to implement. Below is a simple record of the Code to facilitate future persistence. First look at the code
The unlink () function is used to delete objects. If the
I have also written many Image Upload programs before, but none of them are short below. The simpler the program, the better, right?
First, run the source code. You can copy it to your computer to run it ~
Multifile upload " ;
For Web programming, the most important thing is to access and read/write data. There may be many storage methods, such as strings, arrays, and files. Array is an important method in PHP Data Applications. PHP has a large number of array functions.
Sometimes, when we enter a website from a search engine, there will be a line of small words, "welcome from Google/Baidu, by retrieving the" XXX "keyword to this site" and so on. How can this function be implemented? In fact, it is not difficult.
The purpose of the verification code is needless to say. I also wrote an article about the PHP verification code, but it is not encapsulated into a class. The following describes a PHP Verification Code class.
codes =
From the perspective of search engine optimization, 301 redirection is the most feasible method for URL redirection. When the domain name of a website changes, the search engine only indexes the new website and transfers the original external links
To determine whether the uploaded file has been modified, You need to record the md5 value of the uploaded file. Here, record the method for obtaining the md5 value of the file.
if(isset($_FILES['multimedia']) && $_FILES['multimedia']['error']==0){$
There are many methods for getting the extension name of an object. Here is an introduction.
The strtolower () function converts a string to lowercase.
The strrev () function reverses the string.
The strpos () function returns the position
A view is where you can view all your websites. They use a unified interface and can be modified as needed. One of the advantages of MVC is that you separate the presentation layer and the logic layer, and everything looks clean. A view is actually
You can simply write a PHP Image Upload file that supports jpg, png, gif, and other formats. If you want to support more formats, such as bmp, you can expand it by yourself. It is not object-oriented. Here we will record it for future use.
You can
I have found that many PHP programmers, especially those who have not studied PHP for a long time, do not know the essence of PHP. How did Perl become famous in the business world? Its powerful regular expression. What about PHP? He is a language
Listsonclass)
Tag Name: DATA tag of the subloop column (sys_ForSonclassData)
Format: [listsonclass] topic ID, number of entries displayed, number of headers intercepted, whether to display the topic name, operation type, and template ID. Only the
Most of the time, we need to format the number. For example, if the number of digits is less than the first digit, we need to add 0. PHP can be easily implemented, because PHP comes with related functions.
Sprintf () function
1.
E/class/db_ SQL .php encapsulates an SQL statement. Using the class library of the program can bring convenience and efficiency to our development, and reduce the number of files added.
First, make the following preparations:
Create a test
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