1. The write function creates an array of length 10, the elements in the array are incrementing odd numbers, and the first item is 1.function Createarr ($first, $length) {for ($i = $first; $i $num = $i-1;$arr [] = $num;}return $arr;}Print_r
The asort () function sorts arrays and maintains the index relationship. It is mainly used to sort the arrays that are very important to the unit order. The second optional parameter contains an additional sorting identifier.
Asort () definition
After executing the update statement, insert statement, or delete statement in php + mysql, you must determine whether the data has been updated. For more information, see. First of all, I suggest you navigate through the problem. The php Manual is
The numeric amount is converted to the Chinese capital amount function StringInt $ num the lowercase number to be converted or the lowercase string
The code is as follows:
/*** Function for converting a numeric amount to a Chinese capital amount*
Now everyone has countless accounts and passwords, which cannot be remembered. The principle is to complete authentication through the mail server pop service, or use SMTP, the addition of SSL has enhanced security. now everyone has countless
In order to remember the whereabouts of Baidu spider, I wrote the following PHP functions: one is to judge the spider name, the other is to remember the spider to the file, you can take a look
The code is as follows:
Function write_naps_bot (){$
Using the serialize () function and unserialize () function, the usage of these two functions is really out of the box. one is for serialization storage, and the other is for serialization recovery, which is very convenient today, I am doing
The short php code implements DOS attacks. sometimes you can use this code as an attacker without obtaining server permissions. Therefore, you must pay attention to the website security index. php.
The code is as follows:
$ Ip = $ _ SERVER
The number_format () function uses a thousand-bit grouping to format numbers. the number_format () function uses a thousand-bit grouping to format numbers.
Syntax
Number_format (number, decimals, decimalpoint, separator)
Parameters
Some experience in PHP
Author: snowai
Recently, projects in the hands are relatively idle. Come here and share some accumulated skills with you!1. PHP redirectionMethod 1: header ("Location: index. php ");Method 2: echo "script
The installation guide for the new mysql + apache + phpLinux version has just been installed.
It's just today that the company's website has a new server. It took me one morning to install mysql + php + apache.
The old version of the new version
Use PHP programming to develop a "virtual domain name" system. if your server can also implement a simple domain name. In fact, this is not complicated. You can also create a simple domain name system.
The key technology of the simplified domain
PHP multi-level menu program #--------------------------------------------------------
# Data table structure 'menu'
#--------------------------------------------------------
Create table menu (
Menu_id int (11) not null auto_increment,
Menu varchar
PHP implements the download function code, implements secure download, and hides the real address of the file. For more information, see wzskynet # 163.com.
· Php escapeshellcmd multi-byte encoding vulnerability
· Explain in detail the application
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::
When exporting data to excel, the number becomes scientific count. if you need it, you can refer to the following two situations.
1. insufficient length for excel cellsSolution:
The code is as follows:
// In the excel. php file$ ObjActSheet = $
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
We often use phpExcel to import or import xls files. However, if the data exported at one time is large, a memory overflow error occurs, next I will summarize the solution. phpExcel saves the read cell information in the memory. we can use
The
Cut off the title of the article and control it in 15 texts. next we will explain how to implement this requirement. if you are interested, refer to Function: mb_substr ($ str, $ start, $ length, $ encoding)
$ Str: string to be truncated
$ Start:
Regular expressions in PHP (2) confirm repeated appearance
Until now, you know how to match a letter or number, but in more cases, you may need to match a word or a group of numbers. A word may consist of several letters, and a group of numbers may
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