1. Call_user_func
functionA($b,$c){Echo $b;Echo $c;}Call_user_func(' A ', "111","222");Call_user_func(' A ', "333","444"); //Display 111 222 333 444?> //Call the method inside the class is rather strange, incredibly using an array, do not know how
PHP development, when you use empty to check the results returned by a function will be error: Fatal Error:can ' t using function return value in write context
For example, the following code:Copy the Code code as follows:
echo Empty (strlen ('
Recently in the project, there is a strange phenomenon, there is a large form inside there are thousands of input, when submitted, always found that the post came to the data is not complete, at the beginning also suspected that the name of the HTML
first, the controller must be added to the verification code method admin/lib/action/loginaction.class.php
Knowledge Points:
1. Ob_clean function Use
2. Import method call think default class library
3. Image class Buildimageverify method use
The
first, the need to add a paging method in the Msgmanage controller
Knowledge Points:
1. Trial of Count function
2. Page class instantiation operation and related parameter understanding
3, the Limit function is used
4, show function to
1. Insert a single record
Copy CodeThe code is as follows: Db_insert ("table")->fields (Array (' field1 ' = ' value1 ', ' field2 ' = ' value2 ', ' fieldn ' = $valuen))- >execute ();
2. Inserting more than one recordCopy the code as follows:
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
Definition and usage
The Strpos () function returns the position of the first occurrence of a series of internal other strings.
If the string is not found, this feature returns FALSE.
GrammarCopy the Code code as follows:Strpos (String,find,start)
This article mainly describes the thinkphp implementation of multilingual features (language Pack), the need for friends can refer to the following
1. Add the following configuration code in the config.php of Home (the project name you are taking)
When you declare one variable, the initial type was null, but the type can be changed by assign statement.
Global $my _var;echo GetType ($my _var); $my _var = new StdClass (); $my _var->name = ' test '; $my _var->city = ' China ';//$ my_var['
PHP jquery form with validation
Email detection, password duplicate detection, can be used to send the form of various environments, such as sending feedback, registered accountDemonstrate
Xml/html Code
Get the date N days ago
function Get_minday ($n) {
Return date (' y-m-d ', (Time () -3600*24* ($n-1)));
}
Gets the date of the day
$a = "2014-01-22";
$a =strtotime ($a); Time to time stamp
echo Date (' d ', $a);
Next month Number one
$reslut _date=
This is the cookie I just started setting up.
Copy CodeThe code is as follows:
Setcookie ("Qq_access_token", $_session[' Access_token '],time () +3600*24*90);
Found on other pages can not be used, and later into the cookie to see what the problem,
If you need PHP to execute some shell commands to view the results, if the shell output has Chinese, then PHP will get a Chinese return result similar to the "? \230?\180?\187?\229?\138?\168" string. Then this function needs to be translated:
This
Daject Introduction
Daject is used
GitHub Address: Https://github.com/kasonyang/Daject
How to Daject
Suppose there is a table named user in the database with the field id,name,age and the primary key as the ID
First, let's introduce Daject to the
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