PHP mobile internet development File upload/download

Source: Internet
Author: User
PHP100 is the first professional website in China to share PHP resources. It also provides a PHP Chinese communication community. For PHP study researchers: The latest PHP information, original content, open source code and PHP video tutorials and other related content. [Guidance] 1. file upload 1. client settings: (1) specify the values of the enctype and method attributes in the tag. Enctype = "multipart form-data"; Method = "POST" (2). set an input box of the hidden type in the form, where the value of name is MAX.

1. client settings:

(1) in

To download a simple file, you only need to mark the HTML link and specify the URL value of the href attribute to the downloaded file. This method can only process MIME-type files that cannot be recognized by some browsers.


● Microtime

Returns the current Unix timestamp and the number of microseconds.

Mixed microtime ([bool get_as_float]);

● Date_default_timezone_set

Set default time zone

Bool date_default_timezone_set (string timezone_identifier );

● Date_default_timezone_get

Get default time zone

String date_default_timezone_get (void );

III. Character function library

Strlen

Returns the string length.

Int strlen (string $ str );

Strtolower

String to lowercase

String strtolower (string $ str );

Strtoupper

Convert string to uppercase

String strtoupper (string $ str );

Ucfirst

Uppercase letters

String ucfirst (string $ str );

Ucwords

Converts the first letter of each word to an uppercase letter.

String ucwords (string $ str );

Ltrim

Removes spaces or other characters from the start of a string.

String ltrim (string $ str [, string $ charlist]);

Rtrim

Removes spaces or other characters from the end of a string.

String rtrim (string $ str [, string $ chirlist]);

Trim

Removes spaces or other characters from the start and end of a string.

Str_replace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Str_ireplace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Md5

Calculate the MD5 hash of a string

String md5 (string $ str [, bool $ raw_output = false]);

Strpos

Returns the position where one character appears for the first time.

Int strpos (string haystack, mixed needle [, int offset]);



● Date

Format a local time/date

String date (string format [, int timestamp]);

● Getdate

Get date/time information

Array getdate ([int timestamp]);

● Microtime

Returns the current Unix timestamp and the number of microseconds.

Mixed microtime ([bool get_as_float]);

● Date_default_timezone_set

Set default time zone

Bool date_default_timezone_set (string timezone_identifier );

● Date_default_timezone_get

Get default time zone

String date_default_timezone_get (void );

III. Character function library

Strlen

Returns the string length.

Int strlen (string $ str );

Strtolower

String to lowercase

String strtolower (string $ str );

Strtoupper

Convert string to uppercase

String strtoupper (string $ str );

Ucfirst

Uppercase letters

String ucfirst (string $ str );

Ucwords

Converts the first letter of each word to an uppercase letter.

String ucwords (string $ str );

Ltrim

Removes spaces or other characters from the start of a string.

String ltrim (string $ str [, string $ charlist]);

Rtrim

Removes spaces or other characters from the end of a string.

String rtrim (string $ str [, string $ chirlist]);

Trim

Removes spaces or other characters from the start and end of a string.

Str_replace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Str_ireplace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Md5

Calculate the MD5 hash of a string

String md5 (string $ str [, bool $ raw_output = false]);

Strpos

Returns the position where one character appears for the first time.

Int strpos (string haystack, mixed needle [, int offset]);

● Microtime

Returns the current Unix timestamp and the number of microseconds.

Mixed microtime ([bool get_as_float]);

● Date_default_timezone_set

Set default time zone

Bool date_default_timezone_set (string timezone_identifier );

● Date_default_timezone_get

Get default time zone

String date_default_timezone_get (void );

Strlen

Returns the string length.

Int strlen (string $ str );

Strtolower

String to lowercase

String strtolower (string $ str );

Strtoupper

Convert string to uppercase

String strtoupper (string $ str );

Ucfirst

Uppercase letters

String ucfirst (string $ str );

Ucwords

Converts the first letter of each word to an uppercase letter.

String ucwords (string $ str );

Ltrim

Removes spaces or other characters from the start of a string.

String ltrim (string $ str [, string $ charlist]);

Rtrim

Removes spaces or other characters from the end of a string.

String rtrim (string $ str [, string $ chirlist]);

Trim

Removes spaces or other characters from the start and end of a string.

Str_replace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Str_ireplace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Md5

Calculate the MD5 hash of a string

String md5 (string $ str [, bool $ raw_output = false]);

Strpos

Returns the position where one character appears for the first time.

Int strpos (string haystack, mixed needle [, int offset]);

I. file Upload

1. client settings:

(1) in

II. file download

To download a simple file, you only need to mark the HTML link and specify the URL value of the href attribute to the downloaded file. This method can only process MIME-type files that cannot be recognized by some browsers.


● Microtime

Returns the current Unix timestamp and the number of microseconds.

Mixed microtime ([bool get_as_float]);

● Date_default_timezone_set

Set default time zone

Bool date_default_timezone_set (string timezone_identifier );

● Date_default_timezone_get

Get default time zone

String date_default_timezone_get (void );

III. Character function library

Strlen

Returns the string length.

Int strlen (string $ str );

Strtolower

String to lowercase

String strtolower (string $ str );

Strtoupper

Convert string to uppercase

String strtoupper (string $ str );

Ucfirst

Uppercase letters

String ucfirst (string $ str );

Ucwords

Converts the first letter of each word to an uppercase letter.

String ucwords (string $ str );

Ltrim

Removes spaces or other characters from the start of a string.

String ltrim (string $ str [, string $ charlist]);

Rtrim

Removes spaces or other characters from the end of a string.

String rtrim (string $ str [, string $ chirlist]);

Trim

Removes spaces or other characters from the start and end of a string.

Str_replace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Str_ireplace

Character replacement

Mixed str_ireplace (mixed $ search, mixed $ replace, mixed $ subject, [int $ count]);

Md5

Calculate the MD5 hash of a string

String md5 (string $ str [, bool $ raw_output = false]);

Strpos

Returns the position where one character appears for the first time.

Int strpos (string haystack, mixed needle [, int offset]);



The above is the upload and download details of PHP mobile internet development files. For more information, see other related articles in the first PHP community!

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.