Home  >  Article  >  Backend Development  >  [PHP] Practical Functions 6 Page 1/2_PHP Tutorial

[PHP] Practical Functions 6 Page 1/2_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:53:57733browse

//Send an email to the specified email address to, subject represents the subject, and message is the content of the letter. The additional option additional_headers can be omitted, indicating other mail document headers

bool mail(string to,string subject,string message,string [additional——headers]
//Parse the URL string and Return the result into the array. The returned array includes the following elements: scheme, host, port, path, query and fragment, etc.

array parse_url(string url)
//Encode the string into URL, for example The space will become a plus sign. The form data in the web page is encoded with urlencode and then sent out

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

string urldecode(string str) //Open the link to the FTP server. The parameter host is the URL of the FTP server. The parameter port is usually omitted. This parameter is only needed if the port number of the FTP server is not 21. If there is no error, return the connection code, if it fails, return false

int ftp_connect(string host,int [port])
//The parameters ftp_stream and password can be logged in to the FTP server user. Account and password, usually anonymous is a public account, and the password is an email address. Returns true if successful

bool ftp_login(int ftp_stream, string username, string password)
//Used. Get the current path in the FTP server. The parameter ftp_stream is the FTP connection code. If there is an error, NULL is returned.

string ftp_pwd(int ftp_stream)
//Used to return to the upper directory, which is the current directory. The parent directory. The parameter ftp_stream is the FTP connection code. If successful, it returns true

boolean ftp_cdup(int ftp_stream)
//The parameter ftp_stream is the FTP connection code. The directory you want to go to. Returns true if successful, false if failed

bool ftp_chdir(int ftp_stream,string directory)
//Returns the file name or array of the given directory

array ftp_nlist(int ftp_stream,string directory)
//Return a detailed list of a directory as an array of output lines

array ftp_rawlist(int ftp_stream,string directory)
//Can display the remote end The system of the FTP server is equivalent to issuing the system or syst command to the FTP server. If successful, it will return a string, such as "215 UNIX Type: L8", if it fails, it will return false

string ftp_systype(int ftp_stream)
//Used to download the specified file. The parameter "ftp_stream" is the connection code of FTP; the parameter "local_file" is the name of the file to be stored on the local side; the parameter "remote_file" is the name of the file to be downloaded; the value of the parameter "mode" is FTP_ASCII and FTP_BINARY, which represent text files or binary files respectively, and are returned if successful true, false on failure

bool ftp_get(int ftp_stream,string local_file,string remote_file,int mode)
//Download the file and store it in the opened local file. The parameter fp is the file pointer of the opened file on the local side

bool ftp_fget(int ftp_stream,int fp,string remote_file,int mode)
//Used to upload the specified file. The parameter ftp_stream is the FTP connection code; the parameter remote_file is the name of the file to be stored on the remote end; the parameter local_file is the name of the file to be uploaded; the value of the parameter mode is FTP_ASCII and FTP_BINARY

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

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

bool ftp_quit(int ftp_stream)
//Can return the host domain name of an IP address. If the execution fails, the original IP address will be returned

string gethostbyaddr(string ip_address)
//The IP address of a network host can be returned.If the execution fails, return the original computer domain name hostname

string gethostbyname(string hostname)
//Return the IP address list of the given host

array gethostbynamel(string hostname)
//Check whether a DNS record exists for the given Internet host name or IP address. type can be A, MX, NS, SOA, TPR, CNAME or ANY. The default type is MX

int checkdnsrr(string host [,stringtype])
//Get the MX record corresponding to the given Internet host name

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318602.htmlTechArticle//Send an email to the specified email address to, subject represents the subject, and message is the content of the letter. The additional option additional_headers can be omitted, indicating the header of other email documents boolmail(...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn