Recently webmaster himself is also learning PHP, so some of the small PHP development tips out for everyone to learn.
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a
Method One:
Note: 1, $charset variables for the page encoding, such as "gb2312" or "utf-8";
2, the use of method one requires the server must turn on the mbstring.dll extension, or code execution error, so for the use of virtual host
Read the contents of the file and write the variable $contents:
Write the contents of the variable $contents to the file:
Of course, we can also use file_get_contents and file_put_contents to read and write files.
The previous blog is mainly string type, list type and set type, the following hash type and Zset type
1,hset
Description: Sets the value of the domain field in the hash table key to value. If the key does not exist, a new hash table is created and
SPL provides a range of standard exceptions. We should use them scientifically according to the needs of our daily use to make our programs more robust. Logicexception is derived from the Exception base class, and no additional methods are added.
Today, want to upload a large number of pictures to the forum, because the picture is a DSLR shot, large volume, wrote a script, batch compressed pictures.
getimageheight () getimagewidth ()) { $image->resizeimage ($maxsize, 0,
PHP Advanced Programming Learning Note 2014.06.18
MVC (Model-view-controller, model-View-controller) is a very common design pattern that simplifies application development and maintenance. It logically separates the application into pieces. The
"Introduction to the Template: 30 features and Features": 0,
"with blue, orange, green, Gem green, green, cool black, red, rose, pink, purple, business blue, gray blue 12 Colors", support unlimited color extension!
support for iOS, Android system,
Recently heard that PHP5.4 is fast, so I want to build a local environment test. I'm going to install PHP5.4.8, Apache2.4.3, and Mysql5.5.28 with local Windows XP SP3.
First download the latest version of PHP, Apache, and MySQL.
PHP5.4.8 version
recently in the campus library book information collection procedures, since it is the collection of library books, there must be submitted search page, nothing but post submission, let me think of the curl simulation submission, first through
PHP actively disconnects from the browser
Once organized a "about PHP connection processing set_time_limit (), Connection_status () and Ignore_user_abort () in-depth analysis" is to explain the browser client disconnects, the server PHP script
Here are a few usages of import
1. Usage One
Import (' @. Test.translate ');@, which represents the project root directory. Assume that the root directory is: app/The path to the Import class library is: app/lib/test/translate.class.phpConclusion:
Introduction to PHP to resolve form repeating commit implementation method
Repeating commits is a common problem in our development, in addition to the use of JS to prevent the form of repeated submissions, but also can use PHP to prevent duplicate
The switch label in the thinkphp template is used to output different values in the template according to different conditions.
The thinkphp template engine supports switch judgment and can output different results according to different conditions,
Share some common methods of PHP implementation to the text database
PHP can realize the data of the text database display, add, modify, delete, query and so on five basic operations.We take a message this program as an example, the PHP
I believe many people have thought how to use PHP to generate GIF animation to achieve dynamic picture verification code, the following is the implementation process.
Imagecode function through the Gifencoder class implementation of the GIF animated
The thinkphp template engine provides a rich comparison label in the following format:
Content
The comparison labels supported by the thinkphp system and the meanings they represent are:
eq or equal: equalsNEQ or notequal: Not equal
Project development encountered such a problem, in the same method to assign the session array, but I would like to use this session in this method, because I am using the if...elseif ..., because of the exclusion, in the IF condition to assign a
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