[PHP]
; PHP is still an evolving tool, and its functionality is constantly being pruned
; and PHP.ini's setting changes can reflect quite a change,
; Before using the new PHP version, it would be helpful to look at the php.ini.
;;;;;;;;;;;;;;;;;;;
;
Move_uploaded_file function Demo Code:
$upload _file=$_files[' upload_file ' [' tmp_name ']; Get upload file information
$upload _file_name=$_files[' upload_file ' [' name ']; Get upload file name
if ($upload _file)//If a file is uploaded
In PHP There are many ways to put the directory of all the files listed in the code, with E*/
$list = Scandir (".");$zipname = "";foreach ($list as $file){if ($file = = "." | | $file = = "...") Continue$b =substr ($file,-3);if ($b = = ". Gz" | | $b
HTML code
The code is as follows
Copy Code
Processing upload PHP code
The code is as follows
Copy Code
function Do_upload ($upload _dir, $upload _url){$temp _name = $_files['
1, using the Mbstring expansion Library MB_SUBSTR interception will not appear garbled.
2, write the Intercept function, but the efficiency is not as high as the Mbstring expansion library.
3, if only for the output of the intercepted string, can
Sometimes, we need to install several different versions of the PHP environment in the Windows Server, or adopt different php.ini configuration, for example, after encrypting the PHP program using the Ioncube system of China e Business Network, To
1. Use Ip2long () and Long2ip () to store IP addresses to the database in Integer (integer) format, rather than as a string. This reduces the storage space by almost half (char (15) 15 bytes, and the integer is 8 bytes), and it is easier to
close contact with PHP variables, constant learning notes (read notes from PHP manual)
A dollar sign ($) in PHP follows a variable name, representing a variable. The name of the variable is case sensitive. where the variable name
allow numbers or
Addslashes: String add Slash.
Bin2Hex: The binary turns into 16 carry.
Chop: Remove continuous blank.
CHR: Returns the character of the ordinal value.
Chunk_split: Splits the string into small segments.
Convert_cyr_string: Converts the ancient
In short, the following steps are required
1, the installation of the package or ZIP package to install the PHP to the machine, the installation package can be omitted to configure the system environment variable "PATH" and configuration php.ini
,
Today, finally the PHP configuration well, previously configured, you can use but there will always be a bit of something wrong, now completely resolved. Please note that the development environment is not a running environment! Development
?
PHP
/*
** Session Processor* Memcache Implementation* @author Moxie SysTem128@GMail.Com
*/
class
Sessionhandler
extends
Memcache{
Public
$_sessionid
;
#
Session Number
Public
$_sessionexpire
;
#
Session Expiration Time
Public
Curl is a transfer file tool using URL syntax that supports FTP, FTPS, HTTP htpps SCP SFTP TFTP TELNET DICT file and LDAP. Curl supports SSL certificates, HTTP POST, HTTP put, FTP uploads, Kerberos, upload based on htt format, proxy, cookie, user +
php.ini Chinese TranslationPHP is still an evolving tool, and its functionality is constantly being pruned; and PHP.ini's setting changes can reflect quite a change,; Before using the new PHP version, it would be helpful to look at the php.ini.[PHP];
Today came across a deal with a special character of the file, and again notice the problem in PHP:
* PHP strings with single quotes as delimiters, supporting two escape ' and \* a PHP string with double quotes as delimiters that supports the
Usage: void Parse_str (String $str [, Array & $arr])
PARSE_STR is used to resolve (detach) the query string in the URL (query string), which is referred to as a URL in the following section, such as Http://localhost/test/result.php?name=anve &age=21,
Self-reducing operation in PHP
Question: If $i=2, evaluate the value of the expression ($i + +) * ($i + +) * ($i + +) and the value of the $i
Answer: ($i + +) * ($i + +) * ($i + +) The result is 5, $i
Analysis: First look at the calculation order,
For business purposes, you need to upload music. Nginx has a limit on uploading, which should be no more than 2 mb. Therefore, you need to reconfigure it.First, Configure nginx. Find the nginx. conf configuration file and modify the php module in
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