We recommend that you send PHP emails with complete functions. PHP -- The following functions are very powerful: not only can emails in html format be sent, but can also be used to send attachments: Copy the code as follows :? Include "email. class"
PHP class-a full-featured mail class we have already introduced a class for group Mail, which can only send text emails, which of the following functions is very powerful? can I send html-format emails and attachments? PhpclassEmail {--- set the
PHP path function aggregation. The stringrealpath (string $ path) of the PHP path function returns the normalized absolute path name. realpath () checks whether the target file (or folder) pointed to by $ path actually exists, which is equivalent to
PHP provides a full range of email sending functions. Copy the code as follows :? PhpclassEmail {--- set the global variable var $ mailTo; recipient var $ mailCC; CC var $ mailBCC; secretly CC var $ mailFrom
The code is as follows:
Class Email {/
Phpstr_replace: This section describes the system functions related to file operations in PHP. these functions are also very important, the following examples are still common examples.
Basename-part of the file name in the returned
Burpsuite plug-in development-RSA encryption and decryption
This article mainly records the development process of a plug-in that decrypts the request packet, inserts payload, and encrypts. The plug-in application scenario is mainly used to analyze
Listening to songs-using python to implement the function of a music searcher-python
Listen to songs and recognize songs. As the name suggests, use a device to "listen" The Song and tell you what it is. In, it has to play this song for you. This
When uploading php files, we need to obtain the file name suffix and then determine the simple file type. In php, the file name suffix acquisition method is very simple and there are many methods. I will summarize them below.
1. basename ()-returned
This article describes how to use filesystem functions in php. For more information, see
This article describes how to use filesystem functions in php. For more information, see
Basename-part of the file name in the returned
1.basename ()-Returns the file name of the pathTake a look at the following PHP code:1PHP2 3 $path= "/usr/www/html/index.php";4 5 Echo basename($path)." ";6 7 //If you select suffix, the extension is ignored8 9 Echo basename($path, ". PHP");Ten
Suppose there is an image file, and its server path is:$ Path = "/www/mywebsite/images/myphoto.jpg ";1. pathinfo () functionThe pathinfo () function returns an array containing file information. The array contains four elements: dirname, basename,
In PHP, there are also related functions for path operations.
1, Parse_url
This method obtains the most detailed information, can get to Schme, host, path, etc., this function is necessary to know, detailed usage can find
This article describes how to use filesystem functions in php. For more information, see the file name section in the basename-return path.
Dirname-directory part of the returned path
The code is as follows:
String basename (string $ path [,
Php obtains the summary of the file name suffix instance. When uploading php files, we need to obtain the file name suffix and then determine the simple file type. in php, the file name suffix acquisition method is very simple and there are many
PHP provides a full range of functions, such as sending emails.
HtmlYou can also send attachments to emails in the specified format.
Class Email {
// --- Set global variables
Var $ mailTo = ""; // recipient
Var $ mailCC = ""; // CC
Var $ mailBCC = "
PHP provides a full range of email sending functions. PHP provides a full range of email sending functions. the following functions are powerful for sending emails. can you send html emails or attachments? PhpclassEmail {--- set the full PHP
PHP Function Learning 1
1.string dirname (string path)--Returns the part of the directory in the path.
Example 1:
??? $path = "/etc/mymusic";??? $file =dirname ($path);//variable file is/etc??? echo $file;??
?>
2.string basename (String path [
php--the function of the following class is very powerful, not only can send HTML-formatted mail, you can also send attachments
How to use:
Copy CodeThe code is as follows:
Include "Email.class"
$mail->setto ("a@a.com"); Recipient
$mail-SETCC
A Directory Operations
BaseName--Returns the file name portion of the path
DirName--Returns the directory portion of the path
PathInfo--Returns information about the file path
Realpath--Returns the normalized absolute path name
Copy CodeThe code is
Class Email {
---setting global variables
var $mailTo = ""; Recipient
var $mailCC = ""; Cc
var $mailBCC = ""; Secret CC
var $mailFrom = ""; Sender
var $mailSubject = ""; Theme
var $mailText = ""; Text-Formatted letter body
var $mailHTML = "";
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.