Solve the problem: ask for an array of n elements to take out m elements into a new array, altogether can be combined into an array and output
[PHP]
$arr = Array (' A ', ' B ', ' C ', ' d ');
$result = Array ();
$t = Getcombinationtostring ($arr, 4)
[PHP]
if (Isset ($_server[' path_info ')) {
$str =substr ($_server[' path_info '],0,strpos ($_server[' path_info '], '. '));
Get path information (pathinfo)
$pathinfo =explode ('/', trim ($str, '/'));
Get $_get[' m ']
$_get[' m ']= (!emptyempty
See the program notes for more information.
[PHP]
/**
* Function: Analog Sina Weibo landing
* Use: Simulate user login for follow-up operation, such as automating the control of your Sina app to refresh some data
* Precautions:
* 1. Need to install
Range () function
functionThe function returns the cells from low to high in the array,contain themselves, if low>high, then sequence from high to low"Scope of Use">=3.0.8, PhP4, PHP5UseRange (First,second,step)first/required/specified minimum
$str = ' sdfasfs12333ddd12233 ';
Preg_match ('/\d\d\d/si ', $str, $arr);//find three consecutive digits
Echo '
';Print_r ($arr);Echo '';
1. This function will only match the first matching value.
2. $arr [0] to save its results.
Preg_match_all all
Header Common Directives
The header is divided into three parts:
The first part is the version of the HTTP Protocol (http-version);
The second part is state code (status);
The third part is the reason phrase (reason-phrase).
Fix 404 Pages: Use this
/**
* Verification Code Class
* chaojie2008@126.com
* 2012-02-09
* */
Class Vailimg {
Private $width; Verify the width of the code picture
Private $height; Verify the height of the code picture
Private $codeNum; Number of verification code
Broker mode
The mediator pattern is used to develop an object that can transfer or mediate the modification of a collection of these objects in situations where similar objects are not directly connected to each other. When dealing with non-coupled
Delegate mode
By assigning or delegating other objects, the delegate design pattern can remove judgments and complex functionality from the core objects.
Application Scenarios
A CD class was designed with MP3 playback mode and MP4 playback mode in
Scripts often die, and are not always so good-looking. We don't want to show the user a fatal error, or a blank page (in case display_errors is set to OFF).
There is a function called Register_shutdown_function in PHP that allows us to set up
We know that in the use of AJAX technology and PHP background interaction, the Chinese garbled is often the case, JSON as an XML-like data Interchange format, in PHP used to interact with the Chinese language garbled, the way to solve the PHP JSON
PHP Basic algorithm
Here is a few basic algorithms written in PHP, the importance of the algorithm seems to be less heavy for PHP programmers
To, in fact, is very important, classic quotes: algorithm + data structure = program. As a real high-level
Objective
Reflecting on some of the things that have been written recently, some little feelings
For coder who have studied Java or C + +,
The old grammar doesn't mean anything, OOP, the technology of exception
Not to look at the simple instance
First, prepare the software.
1. Apache, find a new version here
2. PHP, Download here
3. Eclipse IDE for Java EE developers, download here
4. DLTK Core Frameworks 1.0 integration build, download here
Note: DLTK is the so-called Dynamic language
The company's cloud platform has turned off the fsockopen, if you want to use the SMTP extranet mailbox to send mail, you can only try to use curl to do
Google first, found a lot of questions related to the question but there is no relevant answer,
Set label
It is mainly used to assign values to variables.
{% Set foo = ' foo '%}{% Set foo = [1, 2]%}{% Set foo = {' foo ': ' Bar '}%}{% Set foo = ' foo ' ~ ' Bar '%}{% set foo, bar = ' foo ', ' Bar '%}{% Set foo = ' foo '%}
{% Set foo = [1, 2]%}
Recently in a project, encountered Ajax Chinese garbled problem, after an afternoon of efforts to finally perfect solution, now will write down, hope to those who still trapped around this problem and headache people have helped.
As we all know,
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