PHP Basic Knowledge Part
1. Find the value of $a
Copy Code code as follows:
$a = "Hello";
$b = & $a;
Unset ($b);
$b = "World";
echo $a;
2. Find the value of $b
Copy Code code as follows:
$a = 1;
The regular expressions we're talking about now basically refer to Perl-style regular expressions. POSIX-style regular expressions are basically out of use, so it's not recommended from PHP5.3, and maybe the next version of PHP will delete the
If you want to use PHP's drawing function, you first need to enable the function of this module. Just remove the php_gd2.dll in front of the php.ini.
Start drawing below:
Copy Code code as follows:
Session_Start ();
Generate
This example for you to share a beautiful PHP code class for your reference, the specific content as follows
Authentication code class Validatecode {Private $charset = ' abcdefghkmnprstuvwxyzABCDEFGHKMNPRSTUVWXYZ23456789 ';//random factor
These two days to achieve this function:
When a certain condition is reached, let the server send text messages to the user, the number is more than one.
Basic idea: Linux regular scan, if there are users to meet the conditions, then send text
PHP Code:
?
$lan = substr (? $HTTP _accept_language,0,5);
if ($lan = = "ZH-CN")
Print (" ');
Else
Print (" ');
?>
HTML Web page According to the browser language of visiting this different automatic jump multilingual page
Add the following code
Array1. The subscript of an array is an integer value or a string type.Eg1. The key of the indexed array is ___, and the key of the associative array is ___.2. When the string is indexed, enclose the quotation marks. A constant or variable cannot be
Copy Code code as follows:
$text = ' One is not able to be good all of the day, but also to do only when you want to see the text without opening the hands of the ten with the main line of the same as before, see through the head and three have
Copy Code code as follows:
function Custom () {
}
Class custom{Public Function index () {
}}Print_r (get_define_position (' Custom '));
/*** /* @param string $name function name or class name* @return Array*/function
The single instance class in PHP is very meaningful for data exchange, saving memory. Write a simple example.Class 1, single instance class itself:
Class UTIL {
private static $instance;
Public function Get () {
if (!self:: $instance)
How to obtain the location (province, city, etc.) based on the existing IP address
function getiplookup ($ip = ') {
if (empty ($ip)) {return
' Please enter IP address ';
}
$res = @file_get_contents ('
Ajax submits the mobile phone number to the database for verification and returns the status value and ajax status value.
The backend receives the ajax submission value, queries the database, and returns the result.
Public function PhoneFind () {if
Thinkphp I () method, thinkphp Method
The I () method is used to obtain the value of the form submitted by the foreground.
I want to complain content with less than 500 words
Obtain the background I method:
$ Content = I ('Param. yang'
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