[PHP] Practical Functions 6 Page 1/2_PHP Tutorial
//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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

This chapter deals with the information about the authentication process available in CakePHP.
