ThinkPHP single letter function (Quick Method) usage summary, thinkphp Function
ThinkPHP has many easy-to-use single-letter functions (that is, quick methods), which can be easily called by developers, but the letter functions are not easy to
Differences between include and require in php
Focus on the red mark statement.
The include (or require) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include
Shenzhen website construction system: displays different customer service information based on the website language.
The original program is a dynamic language program by default. Although static files can be generated, for example, the generated
Yii operation cookie instance introduction, yiicookie instance
Yii has the following common cookie operations:
1. Set cookie:
$ Cookie = new CHttpCookie ('mycooker', 'This is my cooker'); $ cookie-> expire = time () + 60*60*24*30; // there is a time
Ci framework (II), ci framework
Custom SQL statements
When the provided API does not meet our requirements for SQL statements, we usually write SQL statements by ourselves, and CI also provides powerful, A general SQL API that can meet our needs.
$
In PHP development, the traditional file Upload type verification method is based on the file extension (such as the pathinfo function), it is easy to modify the extension to deceive me to write a verification class here, determine the file format
When PHPMYADMIN restores the database, the maximum upload limit is 2, kB. if the database is a little larger, it cannot be processed. you can either use other backup and restoration tools, such as the Empire backup master or export data in separate
Php scheduled task detection user connection status implementation code. if you need it, refer to the scheduled task.
Copy codeThe code is as follows:
Ignore_user_abort (); // the user closes the browser and continues to execute
Set_time_limit (0);
Xml is widely used in joomla. from installation file configuration to templates, modules, components, and plug-ins, all applications are used in fixed formats, here we mainly talk about the application of xml in creating forms. the role of forms is
Write the database username, password, and other information to the configuration file config. in php, include or require in the file that needs to reference the configuration file content, and use the global keyword in the function to compile the
Someone asked me on the internet how to disable ip access in php. through tests, I found that the following code is good and the principle is relatively simple.
// Add IP address access restrictions
If (getenv ('http _ CLIENT_IP ') & strcasecmp
Currently, JSON has become one of the most popular data exchange formats, and almost all APIs of various websites support it. Therefore, let's sort out the support for PHP, which is essential for developing Internet applications (especially for
The server host is CentOS. every time you restart or shut down the server, you have to connect to the server through the client. could you please use the PHP page to shut down the system or restart the server? there is a system method in php, you
The array_merge function and the + operator of the array are quite confused. I wrote a small program to compare them and found their differences, especially the + operator, append the array unit (deduplication) on the right to the back of the array
This class is very powerful and detailed! I hope you will like it and give some suggestions on text and image watermarks.
Supports random or fixed watermark positions (nine cells)
Watermark transparency settings (image watermarks and text watermarks
As expected, the actual test results are the fastest to write directly, with only about 1/3 of the time consumed by other methods. The other two methods are similar. In contrast, SimpleXML is faster than the three methods used to generate XML files
Sometimes we need to transmit values in PHPHTMLJavaScript, so we can refer to the following methods. asp and asp.net are the same ideas and principles. if you need them, you can refer
1. PHP
A. PHP-> HTML & JavaScript
The amount is too simple. I
On the Internet, I saw a very interesting function for converting the php RMB amount to the Chinese capital. The essence of this function is to convert the numbers to the Chinese capital. I tested it. it's very interesting. just enter a number at
This vulnerability was published in packetstorm. I turned it into Chinese and added some annotations, hoping to help my friends who execute PHP on NT. After you download PHP, the installation file in it helps PHP install in NT + ApacheWebServer, the
ZendEngine is the core of PHP syntax interpretation. its development and changes will inevitably greatly affect PHP's language features and execution features. ZendEngine2.0 has not yet been launched in public expectations, but some PHP future looks
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