First, PHP configuration MySQL1, copy the PHP installation directory under the Php_mysql.dll and MySQL installation directory libmysql.dll files to C:/windows/system32;2, Configuration
The following is an example: Rounding to the last two decimal places
Copy codeThe Code is as follows:$ Num1 = 21;Echo sprintf ("% 0.2f", $ num1). ""; // output 21.00$ Num2 = 16.3287;Echo sprintf ("% 0.2f", $ num2). ""; // output 16.33$ Num3 = 32.1232
One is that the input data is not filtered (the input is filtered), and the other is that the data sent to the database is not escaped (Escape output ). These two important steps are indispensable and need special attention at the same time to
1. get_defined_vars(PHP 4> = 4.0.4, PHP 5)-Get an array composed of all defined VariablesArray get_defined_vars (void)This function returns a multidimensional array containing the list of all Defined variables, including environment variables,
The PHP import/export excel function implemented here uses open source PHPExcel. before performing the following operations, download the class library file. Official Website:.
Php import excelThe data format of the imported excel file is as follows:
Use php to simulate the ping command of the commonly used doscommand. Here, we mainly use the php built-in function exec to call the system's ping command to implement the ping command function.Copy codeThe Code is as follows:$ To_ping = 'www
The Remote Management plug-in is currently widely used by WordPress site administrators. It allows users to perform the same operations on multiple sites at the same time, such as updating to the latest release version or installing the plug-in.
PHPExcel is a PHP class library used to operate OfficeExcel documents. It is based on Microsoft's OpenXML standard and PHP language. You can use it to read and write workbooks of different formats. Codeigniter is a powerful PHP framework. The
There are many Codeigniter database operations on the Internet. Here is a summary.
Copy codeThe Code is as follows: // query:$ Query = $ this-> db_query ("SELECT * FROM table ");========================================// Result () returns an array
Get the url of the current page php Tutorial code, the first is a get url without parameters, the second is to get the complete url function
Get the url of the current page php Tutorial code. The first is a get url without parameters, and the second
The following function is a php hexadecimal instance that prints a string. The core function here is chr to obtain the binary value and convert it to the hexadecimal number. the code is as follows: & lt ;? Php * php printing
The following function
In php, cookies are commonly used, but many friends may not know how cookies work. The following section will help you sort out the working principles of php cookies and
Cookies are commonly used in php, but many friends may not know how cookies
Some of my friends will ask how the Session works. what is the difference between it and cookies? next, let's introduce the working principle of the Session to all of you and some friends who need to know about it.
Some of my friends will ask how
In program development, error handling is very important. today this article tells him about the importance of error processing functions in php development and provides examples.
In program development, error handling is very important. today this
You can use ini_set to quickly modify the phpini configuration settings. you do not need to open phpini. in particular, when you do not modify the phpini permission on a VM, you will find that this function works.
You can use ini_set to quickly
The Reference type is used in many computer languages and exists as a very powerful and practical feature. it has implementations similar to pointers, but it is different from pointer
The Reference type is used in many computer languages and exists
In php, static is a static variable. it can define a function and the variable is a global static variable. So what will happen to the function and variable when we add static before the function or variable?
In php, static is a static variable. it
1 define the constant define (& quot; constant & quot;, & quot; helloworld & quot;); a constant can only contain scalar data (boolean, integer, float, and string) when calling a constant, just use a simple name
1. define the constant define
When ThinkPHP calls the debugging mode, it does not know why it only displays page trace information, but does not display the page running time and database query time as TP itself said, go to brothers, QQ and ThinkPHP official website to ask
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