In fact, this content can be learned in the php manual, but many beginners of php do not know how to look at the php manual, so I love the Micro Network. now I will explain the first php built-in functions.
Case-sensitive conversion functions
Text
Three methods: count and sort the number of each character in a string. there are multiple solutions ~ The str_split () function is very important.
The code is as follows:
// This method is purely a back-function and is not explained;
Function
Simple factory mode instance code in PHP. for php-like learning, refer to the simple factory mode below:
① Abstract base class: Class defines abstract methods for implementation in sub-classes
② Inherit from the subclass of the abstract base class:
The drop-down prompt box for php + mysql + ajax implementation of Baidu search mainly contains three files and three files in the same directory. below is the code for the three files. import the SQL file to the mysql database and modify it. under
Mt_rand () is four times faster than rand (). many old libc random number generators have some uncertain and unknown features and are very slow. The rand () function of PHP uses the libc random number generator by default. The mt_rand () function is
TreeTable is a PHP class library plug-in that can display infinite categories as tables. the classification level is represented as the column of the table, and the number of rows of the classification is the total number of table categories. The
This is a gif operation animation that I recorded. the picture is relatively large. if you are not able to see the picture online, you can save the picture to your local machine to view it again.
The original code in the animation is as follows:
Php calculates the code that contains the largest number of characters in a string with an unknown length. For more information, see the following functions:
Str_split: splits the string into arrays. A similar function explode () splits strings into
Today, we need to use php to output a 404 error page, and then load the 404 page output. each page is convenient for users and search engine users to experience the 404 page.
Core code:
The code is as follows:
@ Header ("http/1.1 404 not found
PhpMyAdmin has an export. php: Missingparameter: whatexport_type error. if you have encountered the same problem, refer to phpmyadmin.
PhpMyAdmin cannot export data. after you click Export, a request fails or a white page is displayed. an error is
Our phpmongodb can also provide almost all functions that mysql and sqlserver can do. This article will introduce MongoDB in detail.
Our php mongodb can also provide almost all functions that mysql and SQL Server can do. This article will introduce
I encountered a problem in the manual that I didn't want to understand. record it to make it easy for a friend who needs it.
The code is as follows:
Class Bar
{
Public function test (){
$ This-> testPrivate ();
$ This-> testPublic ();
}
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
The organization structure of the nginx + php-fpm configuration file. For more information, see Nginx
1. nginx configuration file path
Generally, when installing nginx, the default path of the configuration file is/usr/local/nginx/conf/nginx.
The php program file generates content to the Word document and provides the download function implementation code. For more information, see
This article mainly solves two problems:
1: how to generate html content into Word documents in php
2:
Use PHP to connect to the MSSQLServer database and check the database code select collationproperty ('Chinese _ PRC_Stroke_CI_AI_KS_WS ', 'codepage ')
The return value is 936, which is GBK encoding.
GBK, Simplified Chinese, 936
950
This function can be used to substitute variable values in a string for eval processing database data.
Enter the value in the string.
Syntax: void eval (string code_str );
Return value: None
Function type: data processing
Description
This
Php randomly extracts code for some elements from the array. For more information, see
The code is as follows:
Class getValues {
Public function inputValue ($ inputArray ){
$ This-> inputArray = $ inputArray;
}
Public function getValue ($
The following implementation code searches for tags from the database and formats the tags so that they are displayed based on the number of occurrences to connect to the database, the table storing the article contains the "Tag" field, which is
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