This article describes the use of string length interception in PHP. Share to everyone for your reference, as follows:
PHP provides a lot of usage functions, where the Intercept function of the string is no exception, and the function is very
1. Modify Max_execution_time
In PHP, the default page execution time is 30 seconds, more than 30 seconds, and the script stops executing.This will make it impossible to open the Web page. Then we can modify the Max_execution_timeLook in the
This article describes the JSON Chinese processing solution for PHP. Share to everyone for your reference, as follows:
JSON is now widely used in the format of passing strings, compared to XML is more easy to understand and more convenient to
Resume oracle.sh in/etc/profile.d/
The contents are as follows in Nls_lang setup encoding
oracle_home=/usr/lib/oracle/12.1/client64c_include_path=/usr/include/oracle/12.1/client64ld_library_path=$ Oracle_home/lib#remember This is the client
1.Memcache Related Introduction
Memcache is a high-performance distributed memory object caching system that can be used to store data in a variety of formats, including images, videos, files, and database retrieval results.
The use of Memcache
Change the configuration file to this
server { listen; server_name sub.domain.com; Set $root _path '/srv/www/default '; Root $root _path; Index index.php index.html index.htm; Try_files $uri $uri/@rewrite; Location @rewrite {
Read data from all rows in a CSV file at once
"; }} */Echo $goods _list[2][0]; Fclose ($file);? >
Reads a row of data from a CSV file
Read CSV file number of rows (line interval)
In addition to find two methods from the Internet (no test, do
Choose to download the eaccelerator for your system and PHP version
2. Rename it to Eaccelerator.dll (win version) and move to the Ext folder in your PHP directory
3. Create cache folder in C:\php\ temp Modify permission for user group to read
This example describes the use of namespace in PHP. Share to everyone for your reference, as follows:
Now say this feeling a bit out of date, but feel with namespace of people still not much, estimate or because not accustomed to it.
Class
This paper analyzes the usage of strlen and Mb_strlen in PHP. Share to everyone for your reference, as follows:
First look at the following code (file encoding UTF8):
Operation Result:
int. INT int 9 int 19
The 2nd parameter, together
This example describes the use of the character intercept function msubstr () in thinkphp. Share to everyone for your reference, as follows:
Thinkphp has a built-in character intercept function msubstr () as follows:
Msubstr ($str, $start =0,
The function of Get_class () is to return the class name of the object.
Description
Usage:
String Get_class ([object $obj])
Returns the class name corresponding to the Obj object, or False if obj is not an object.
With this method, we can make a
The substr () function is used to intercept strings, but there is a problem with Chinese characters, and mb_substr () and Mb_strcut functions can be similar to substr (), except that at the end of the function you add more than one parameter to set
A grammar
foreach (array_expression as $value)
Statement
foreach (array_expression as $key = $value)
Statement
The foreach statement iterates through the array array_expression, assigning values in the current array to $value (or $key and $value)
Now say the function, PHP function is simple
Functions are defined as a function, as JavaScript does not require a function type, and even formal parameters do not need
Output 1
Output 2
The last A is actually the beginning a will print 1Of
Data type
PHP supports integers, floating-point numbers, strings, arrays, and objects. The variable type is usually not determined by the programmer and is determined by the PHP run process to convert a variable of some type to the specified type
Rearrangement of class distributions during development
1. CRUD main control class
2.CRUDField Field Class
3.CrudOperation All Operation classes
4.CrudOperationSet Operation Set
5.CrudOperationIndex Home Processing Class
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