Php bit operations are not often used in php, but they are very useful. Next we will introduce the usage of php bit operations.
$ A & $ B and (bitwise and)$ A | $ B or (by bit or)$ A ^ $ B Xor (bitwise Xor)~ $ A Not (Not by bit)$ A $ A >>$ B Shift
The array_merge function and the + operator of the array are confused. I wrote a small program to compare them and found their differences. In particular, the + operator, which means that the array unit on the right (deduplication) is appended to
This article introduces how PHP implements 301 permanent redirection to direct a domain name without www to a domain name with www.
When your site domain name changes or the webpage address changes (the webpage storage directory or the webpage file
The default session validity period in PHP is 1440 seconds (24 minutes). What should we do if we want to keep the session from expired? Next we will introduce the best way to do this without modifying the program, if you modify the program, the test
In php, sometimes we want to get the extension of the uploaded file. Next I will summarize the method of getting the extension in php. If you need it, please refer to it.
Method 1: One of my most convenient methods to get an extension
The
This article introduces how to use basic loop statements in php, including for loop, while loop, and do while loop. This article is suitable for beginners of php.
You can use the for statement to control multiple variables to implement advanced
If you encounter a php error that does not display, it may be that you shut down the error prompt in php. ini. The solution is simple. You just need to change display_error = off in php. ini to on.
Solution
1. in php. ini
Error_reporting = E_ALL &
When using phpmyadmin, we found the solution to the Cannot start session without errors problem. I hope this article will help you.
Solution 1, Nginx Environment
In a new environment, a phpmyadminThe following message is displayed: Cannot start
A lot of new users will touch the White Paper behind dedecms5.7 login after installing php5.4 on the server. It's just like snow. Let's look at the solution to the blank background login problem of dedecms.
Linux, php5.4, and zhimeng dedecms
Multi-process can be said that php is much worse than java in this regard. It is fun to find a PHP multi-process instance. Let's take a look.
The Code is as follows:
Copy code
$ Cmds = array (a, B, c, d );Foreach ($ cmds as $
This file download instance is very detailed. It is combined with the header function and the while fread function to split the file and read it and then send it to the client. It is considered a standard file download instance.
A small PHP File
The generation and call methods of the three php Chinese verification codes must be different from the generation of the verification code to generate the Chinese verification code in php, because the GD function only accepts UTF-8 encoded text,
In php, The imagecreatetruecolor function must be used to generate high-definition images. The following describes how to use imagecreatetruecolor (int x, int y) to create a black image with a size of y, in this example, the background color is not
The implementation code of a small Graph Generation function. If you need it, you can refer to it. Each of them has detailed parameter descriptions.
The Code is as follows:
Copy code
Uploads. php fileClass image_upload
This article introduces the program code for generating the snowflake background verification code in php. If you need it, you can refer to it.
Verification Code Generation Program
The Code is as follows:
Copy code
This article describes how to import an excel file to a mysql database.
Download first
Download the phpexcel file at phpexcel.codeplex.com/
Find the following similar code in the reader. php file (the first line is both) and change it to the correct
The reason why php cannot connect to mysql is that the function is not enabled or the mysql database configuration is incorrect, next I will introduce you to the analysis and solution of some problems that php cannot connect to MySQL.
Symptom 1
In
All the generated excel files use the phpExcel class. Next I will introduce the solution to the problem that the generated excel column name contains more than 26 columns and is greater than Z.
This is a method in the phpExcel class. I found it
In php, we usually use the following four types of loop statements: while, do while, for (), and foreach, which are commonly used in development, if you have any need, refer to the usage of such statements in this tutorial.
Foreach statementThe
This article describes the controller class tutorial in mvc. Through the last two sections, we know that the program determines the unique moudle, conttoller, and action through the route class of a single entry file, and finally executes
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