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

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

Jul 21, 2016 pm 03:53 PM
message php for theme function address practical e-mail express mail

//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 of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

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

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

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

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

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

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

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

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

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

CakePHP Logging CakePHP Logging Sep 10, 2024 pm 05:26 PM

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

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

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

CakePHP Services CakePHP Services Sep 10, 2024 pm 05:26 PM

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

See all articles