Definitions and usageThe Zip_entry_filesize () function returns a compressed archive entry for the original file size (before compression).Grammar
Zip_entry_filesize (Zip_entry)
Parameter descriptionZip_entry requirements.
Sixth chapter (2) The common traversal method of the arrayCount () in PHP, enter the header name of an array in this function, and how many pieces of data in this array will output a few digits. sizeof with the same function.The Foreach Loop
Server variable $_server Detailed:* I think the more common and important, {} Part of my own debugging after adding, easy to understand.* 1, $_session[' php_self ']--gets the filename of the currently executing script2, $_server[' Server_protocol ']-
The mysql_real_escape_string () function escapes special characters in strings used in SQL statements.The following characters are affected:• X00• N• R••'•"• X1aIf yes, the function returns the escaped string. If it fails, false is returned.The
Switch statementIf you want to selectively execute one of several code blocks, use the Switch statement.Use the Switch statement to avoid lengthy code blocks such as if... elseif... else.Syntax The code is as follows:Copy code Switch (expression)
Original String 1, 2, 3, 4, 5, 6,Remove the last character "," and the final result is 1, 2, 3, 4, 5, 6.The code is as follows: The code is as follows:Copy code $ Str = "1, 2, 3, 4, 5, 6 ,";$ Newstr = substr ($ str, 0, strlen ($ str)-1 );Echo $
Html code The code is as follows:Copy code upload picture more once Pictures: Php processing code The code is as follows:Copy code If ($ _ POST ['upload'] = 'send '){$ Dest_folder = "picture /";If (! File_exists ($ dest_folder
1. Image extraction class (abstract)In our actual development process, some classes do not need to be instantiated. For example, some of the parent classes we learned earlier mainly involve subclass inheritance, which improves code
II. Directory operationsFirst, we will introduce a function that reads data from a directory, such as opendir (), readdir (), and closedir (). When using this function, we will first open the file handle and then list it through iteration: The code
The forced type conversion in PHP is very similar to that in C: add the target type enclosed in parentheses before the variable to be converted: The code is as follows:Copy code $ Foo = 10; // $ foo is an integer.$ Bar = (boolean) $ foo; // $
In PHP, variable types are determined by the values assigned to them. If the value is an integer, the variable is an integer. If the value is a string, it is a string. The code is as follows:Copy code $ Name = "your name"; // name string type.$
There are three types of arrays:Numeric arrayArray with digit ID keyJoin arrayEach ID key in the array is associated with a value.Multi-dimensional arrayArray containing one or more arraysArrays in PHP are actually an ordered ING. Valuing is a type
// Requirement: add a request = xxx after all connections. This function is more flexible than preg_replace. Note that it replaces the content of the entire regular expression.$ Content = ' Link 1 Link 2 ';Function add_source ($ matches){If
// Preg_replace (mixed $ pattern, mixed $ replacement, mixed $ subject [, int $ limit =-1 [, int & $ count]) subject: match search mode, replace/*The pattern to be searched. It can be a string or a string array.After the electronic modifier causes
The chmod () function changes the file mode.Chmod-Changes file modeTRUE is returned if the call succeeds. Otherwise, FALSE is returned.SyntaxChmod (file, mode) Parameters Description File
PHP is a weak language. When using the IN_ARRAY function, try to include the third parameter TRUEview sourceprint? 12 var_dump (in_array (0, array ('s', 'SS'), true); // return false3 4 var_dump (in_array (0, array ('s', 'SS'); // return true5 6
The ksort () function sorts the array by key name and retains the original key for the array value.The second optional parameter contains an additional sorting flag.If yes, TRUE is returned. Otherwise, FALSE is returned.This value is newly added to
Php is_dir determines if it is a directoryIs_dir-determine whether the file is a directoryReport error descriptionBoolean is_dir (string $ file name)Indicates whether the specified file name is a directory.Report error parametersFile nameFile path.
Imagealphablending("= 4.0.6, PHP 5" in PHP 4)Imagealphablending-set the image blending modeReport error descriptionBoolean imagealphablending ($ img, $ blendMode $)Imagealphablending () two pairs of true-color images can be drawn in different modes.
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