PHP learning notes: install and configure the php environment under IIS7. For more information, see how to install Php.
Php version selection
Php in windows (php5.4.7) has two versions:
VC9 x86 Non Thread Safe Non-Thread security model run in
First, this question is a bit problematic because the private attribute cannot be inherited. please read this sentence carefully if the parent class has private attributes. The method of the parent class serves only the private attributes of the
You can directly call a function that converts a PHP result set to JSON format. if you need a PHP result set, you can refer to the function that converts it to JSON format, you can directly call:
The code is as follows:
Function RecordToJson ($
After Google finds this code, you can obtain the IP address based on your environment. if you need the IP address, you can refer to the code, but I always wanted to use the ipv6-test API to get the user's IP address ...... But what JSON gets is the
A simple PHP getting started source program. you can take a look at it. A simple PHP getting started source program. you can take a look at it.
The following is an example of the Chinese document "star prodigal son" php:
Chatting room is a secret
This article will introduce in detail the comments, variables, arrays, constants, and function applications in php. For more information, see
What is the difference between single quotes and double quotes in php?
1. the variables in double
Library management procedure (2) entry of the Library Directory:
If (! $ UploadAction ):
?>
// This program is used to enter the title, author, and publisher information.
// Editor: Kong Xiuxiang. Date: 2001/3/24
/*
Session_start ();
If (! Isset ($
This article provides a method for transferring variables between php and javascript. For more information, see PHP variable to Javascript variable:
The code is as follows:
Comments on the session function of php4 (1) php4 is added with session support over php3. I used it a little bit. for its function interface, internal mechanism,
I have a rough understanding of the ease of application.
The meaning of a session
Comments on the session function of php4 (2) the vague comments are session_decode and session_encode:
Bool session_decode (string data );
Session_decode () decodes the session data in data, setting variables
Stored in the session.
Bool
To convert the database date format, you only need to specify the date format code in convert, such:
Select convert (char (20), getdate (), 101)
Select emp_id, convert (char (20), hire_dt, 101) from employee
---------------------------------
During php file preparation, a blank line is displayed on the top of the browser when previewing the php file, which affects the page layout, A blank line will appear on the top, affecting the page layout.
The BOM header is described as follows::
In php, the quickest way to read files is to use functions such as file and file_get_contents, A few simple lines of code can perfectly complete the functions we need. However, when the operated file is a relatively large file, these functions may
A ubbcode function is very fast.
However, the speed is slow and long.
Here is
Function ubb ($ str ){
$ Color = Array ('red', 'blue', 'green ');
$ Str = eregi_replace ('\ [url \] ([a-zA-Z0-9 @: % _.~ #-\? &] +) \ [\/Url \] ',' \ 1 ', $ str); // url
$
Sometimes when we read the database output, we may need to sort the data by the Chinese user name. some new friends have no idea about this. next we will introduce the implementation method in detail in the small editor, if you are interested, you
Because the ftp of your website does not directly set the attributes of files in the space, you wrote a php code to modify the index. the PHP file attribute is index. after setting the read-only attribute for the PHP file, the Trojan has no
In the unix world, the newline is replaced by n, but in windows, rn is used to reflect its differences, and r is more interesting in mac. Therefore, unix series use n, windows series use rn, and mac use r. Therefore, using the program you write to
Using PHP to generate random numbers can be applied in many places, for example, you can design random passwords for programs, simulate dice games, and Rock Scissors game applications. sometimes we need to use random user names and passwords in
For PHP beginners, PHP recursive usage may be unfamiliar. Let's talk about the PHP recursive call to implement the multi-element array replacement function in PHP's actual encoding. when we need to implement the multi-element array replacement
When you use a string function to output an integer PHP version number and then use a program, you generally need to determine the php version number after the integer to determine the output.
$ Temp = explode (".", phpversion (); // Obtain 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