Command: file_put_contents ();
Command Parsing: file_put_contents (PHP 5)
File_put_contents -- write a string to a file
Note:
Int file_put_contents (string filename, string data [, int flags [, resource context])
It is the same as calling the fopen
For example:
The first number is: 1.
When you look at the first number, you can say 1, then the second number is: 11.
Looking at the second number, you can say 2 1, that is, the third number is 21.
Looking at the third number, you can say 1, 2, 1,
I. installation and configuration
1. Download PHP XDebug extension, URL: http://xdebug.org/
2. Compile and install XDebug in Linux
ReferenceTar-xzf xdebug-2.0.0RC3.gzCd xdebug-2.0.0RC3/Usr/local/php/bin/phpize./Configure -- enable-xdebugCp
Definition and usage
The str_pad () function fills the string with the specified length.
SyntaxStr_pad (string, length, pad_string, pad_type) parameter descriptionString is required. Specifies the string to be filled.Length is required. Specify
1: Get the file object
2: Read Binary data
3: Simulate http requests and send data (this is usually troublesome)
Use the sendasbinary method of the xmlhttprequest object to send data under forefox;
4: Perfect implementation
Problems
Document directory
Syntax
Copy codeThe Code is as follows: $ username = "zongzi ";
Echo substr_replace ($ username, '**', '1', '2 ');
Definition and usage
The substr_replace () function replaces one part of the string with
PHP debugging involves many methods. Today I recommend FirePHP (http://www.firephp.org /).
This tool is a firefox-based component. Firephp component installation address. Install this component before use. A FirePHP package needs to be down after
Copy codeThe Code is as follows: /*
Compress multiple CSS files into one and cache for an hour.
Use the same code for Javascript, but replace below "text/css" with "text/javascript" and of course make sure you include. js files instead of. css
Php code:
Copy codeThe Code is as follows:/*/flashservices/services/Catalog. php */
Class Catalog {
Var $ products_array = array ();
// Constructor: Contains the list of methods available to the gatewayFunction Catalog (){$ This-> methodTable =
Similar to spl's autoload function, bloader is the php Object's autoload tool, but it is simpler, more efficient, and more flexible in configuration.
Bloader provides a common autoload function ld and two auxiliary functions, ld_new (instantiation)
1. Value ExtractionIn PHP, use list to extract the values in the array, such as list ($ a, $ B) = $ array. If the number of values in the list is greater than the number of arrays, the excess values in the list are set to NULL. You can also use
Copy codeThe Code is as follows: /*
Php generates a text png image. You can call the function as follows:
Http://www.yourdomian.com/text_png.php3? Msg = helloworld + class & rot = 15 & size = 48 & font = fonts/ARIAL. TTF
*/
Header ("Content-type:
1. Access a single characterIn PHP, strings can be treated as an array of characters, and strings can be accessed directly using the array access method. For example, $ str [0].Note that if the character is not an ASCII code, access may fail.
Friend A: It is required to reverse the string to a PHP Array Based on a string, and the string provided is printed by print_r of php. For the moment, we will not consider whether this method can ensure data accuracy or other unexpected situations.
First, we can check the reverse quotation marks to successfully execute the code snippet named. The Code is as follows:
Copy codeThe Code is as follows: 'LS-al ';
'LS-al ';
Echo "sss"; 'LS-al ';
$ SQL = "SELECT 'username' FROM 'table' WHERE 1 ";
$
Copy codeThe Code is as follows: Class person {
// The following are the member attributes of a person.
Var $ name;
// Name of the person
Var $ sex;
// Gender of a person
Var $ age;
// Age of the person
// Define a constructor parameter as name $
Let's take a look at the problem.
StringCopy codeCode: $ str = ' ';
The regular expression isCopy codeThe Code is as follows: $ strRegex1 = '%
This regular expression of laruence cannot be matched, so we cannot implement the functions we want.Then
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