[PHP] function 6

Source: Internet
Author: User
[PHP] function 6 // send an email to the specified email address. subject indicates the subject and message indicates the Mail content. The additional option additional_headers can be omitted, indicating the header of other mail documents.

Bool mail (string to, string subject, string message, string [additional -- headers]
// Parse the URL string and return the result to the array. The returned array includes the following elements: scheme, host, port, path, query, and fragment.

Array parse_url (string url)
// Encode the string with a URL. for example, a space is converted into a plus sign. In the webpage, form data transmission is encoded with urlencode before being sent.

String urlencode (string str)
// Restore the URL encoded string

String urldecode (string str)
// You can open a link to the FTP server. The host parameter is the URL of the FTP server. The port parameter is usually omitted. if the port of the FTP server is not 21, this parameter must be added. If no error exists, the connection code is returned. if the connection fails, false is returned.

Int ftp_connect (string host, int [port])
// You can log on to the FTP server. The ftp_stream and password parameters are the user account and password of the FTP server. generally, anonymous is a public account, and the password is an email address. True is returned if the call is successful.

Bool ftp_login (int ftp_stream, string username, string password)
// Obtain the current path on the FTP server. The ftp_stream parameter is the FTP connection code. If an error exists, NULL is returned.

String ftp_pwd (int ftp_stream)
// Return to the upper Directory, that is, the parent directory of the current directory. The ftp_stream parameter is the FTP connection code. True is returned if the call is successful.

Boolean ftp_cdup (int ftp_stream)
// Used to go to the Next Directory. The ftp_stream parameter is the FTP connection code. The directory parameter is the directory to go. Returns true if the call succeeds, and false if the call fails.

Bool ftp_chdir (int ftp_stream, string directory)
// Return the file name or array of the given Directory

Array ftp_nlist (int ftp_stream, string directory)
// Return the detailed list of a directory by array of output rows

Array ftp_rawlist (int ftp_stream, string directory)
// Displays the system of the remote FTP server, that is, the system or syst command under the FTP server. Returns a string, for example, "215 UNIX Type: L8". if it fails, false is returned.

String ftp_0000ype (int ftp_stream)
// Download the specified object. The ftp_stream parameter is the FTP connection code. the local_file parameter is the name of the file to be downloaded. the remote_file parameter is the name of the file to be downloaded. the mode parameter values include FTP_ASCII and FTP_BINARY, indicates either a text file or a binary file. if the file is successful, true is returned. if the file fails, false is returned.

Bool ftp_get (int ftp_stream, string local_file, string remote_file, int mode)
// Download the file, which exists in the opened local file. The fp parameter is the file pointer of an opened file on the local end.

Bool ftp_fget (int ftp_stream, int fp, string remote_file, int mode)
// Uploads a specified object. The ftp_stream parameter is the FTP connection code. the remote_file parameter is the name of the file to be uploaded. the local_file parameter is the name of the file to be uploaded. the mode parameter values include FTP_ASCII and FTP_BINARY.

Bool ftp_put (int ftp_stream, string remote_file, string local_file, int mode)
// Send the cmd command to the FTP host. This command is not standardized, but related to the host operating system of the server. it can be used for file access permission and group member operations.

Bool ftp_site (resource ftp_stream, string cmd)
// Close the FTP connection

Bool ftp_quit (int ftp_stream)
// The host domain name that can return an IP address. If the execution fails, the original IP address is returned.

String gethostbyaddr (string ip_address)
// Return the IP address of a network host. If the execution fails, the original computer domain name hostname is returned.

String gethostbyname (string hostname)
// Returns the IP address list of the specified host.

Array gethostbynamel (string hostname)
// Check whether DNS records exist for the specified internet host name or IP address. the type can be A, MX, NS, SOA, TPR, CNAME, or ANY. the default type is MX.

Int checkdnsrr (string host [, stringtype])
// Obtain the MX record corresponding to the specified internet host name

Int getmxrr (string hostname, array mxhosts [, array weight])
// You can create a Session or resume the current Session.

Bool session_start (void)
// End the Session

Bool session_destroy (void)
// Get or modify the current Session name

String session_name (string [name])
// Obtain or modify the name of the current Session module

String session_module_name (string [module])
// You can obtain or reconfigure the current Session path. If the path parameter is not set, only the directory name of the current Session is obtained. if the path parameter is added, the Session is stored in the new path.

String session_save_path (string [path])
// You can obtain or reconfigure the current Session code. If no parameter id is specified, only the current Session code is obtained. when a parameter is added, the Session code is set to the New specified id.

String session_id (string [id])
// Add a variable from the global variable to the current Session. The parameter name is the name of the variable to be added. if the parameter is successful, true is returned.

Bool session_register (string name)
// Delete the name variable in the global variable in the current Session

Boolean session_unregister (string name)
// Check whether the specified variable has been registered in the current Session

Boolean session_is_registered (string name)
// Sets the current Session to be serialized and returns the serialized representation.

String session_encode (void)
// Decodes Session data. The parameter data is used to decode the data. if data is successfully decoded, true is returned.

Bool session_decode (string data)
// Sets the user-level Session storage function. generally, Session data can be stored in the local host database.

Void session_set_save_handler (string open, string close, string read, string write, string destroy, string gc)
// Cancel the setting of all registration variables in the Session

Void session_unset (void)
// The header is the string sent by the web page server before the HTML document is sent to the browser using HTTP message. a blank line is left between the header and the HTML file.

Int header (string)
// Send a Cookie as a part of the HTTP header. the parameter name indicates the Cookie name and the value indicates the Cookie value, if this parameter is an empty string, the Cookie data is canceled in the browser. expire indicates the Cookie validity period. path indicates the Cookie-related path. domain indicates the Cookie's website; secure is valid only during secure https transmission.

Int setcookie (string name [, string value [, int expire [, string path [, string domain [, int secure])
// If the header has been sent, true is returned; otherwise, false is returned.

Bool headers_sent (void)
// Convert special characters (with signs &, double quotation marks, single quotation marks, minor signs, and greater than signs) into HTML objects

String htmlspecialchars (string)
// Convert all characters in string into HTML objects

String htmlentities (string)
// Returns the internal conversion table used by htmlspecialchars () and htmlentities ().

String get_html_translation_table (int table [, int quote_style])

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.