PHP -- the following functions are very powerful: not only html-format emails can be sent, but also attachments can be sent.
Usage:
Copy codeThe Code is as follows: Include "email. class"
$ Mail-> setTo ("a@a.com"); // recipient$ Mail-> setCC ("B @
String realpath (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 exists, which is equivalent to calling file_exists ($ path ).
If the
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,
This type of function is very powerful, not only can send html format emails, but also can send attachments Note: When the author published it, it changed 《《? PhpclassEmail {--- set the global variable var $ mailTo; recipient var $ mailCC; CC var $
: This article mainly introduces PHP's summary of path operations. For more information about PHP tutorials, see. In PHP, there are also related functions for path operations.
1. parse_url
The information obtained by this method is the most detailed.
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 = "";
PHP class-fully functional mail class, read PHP class-fully functional mail 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
The functions of this class are very powerful Today. they can not only send html emails, but also send attachments.
The functions of this class are very powerful Today. they can not only send html emails, but also send attachments.
The
PHP file Operation function There are many kinds of, today here I will share with you PHP commonly used file operation function, say, let us look at the PHP file operation what is the function of it.
1 php Gets the file name:basename-returns the
Common File operation functions of PHP are classic favorites. The following is my summary of the PHP file operation functions. Of course, this is only part of it. there are many other parts that I have not listed. 1. resolution path: 1. get the file
PHP mail code with complete functions is provided with a detailed description .? PhpclassEmail {--- set the global variable var $ mailTo; recipient var $ mailCC; CC var $ mailBCC; secretly CC var $ mailFrom; sender var $ mailSubject; topic var $
During shell programming, you often encounter the problem of getting the file name and file suffix. The general solution is as follows:
1 # Code 2 file = " thisfile.txt " 3 echo " filename :$ {file %. *} " 4 echo "
Copy CodeThe code is as follows:
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
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
In-depth analysis of JavaWeb Item22 -- internationalization (i18n)I. Overview of international development
Internationalization of software: When developing software, you must enable it to respond to accesses from different regions and countries
C-shell excellent program-general Linux technology-Linux programming and kernel information. The following is a detailed description. 1. switch usage. Note that each case must end with breaksw
Otherwise, the next case command will be executed.
(1)
Example of filesystem function usage in php
This article describes how to use filesystem functions in php. For more information, see
Basename-part of the file name in the returned path
Dirname-directory part of the returned path
The Code is as
Example code of the thinkjs file upload function,
Introduction
ThinkJS is a Node. js framework for future development. It integrates a large number of project best practices to make enterprise-level development so simple and efficient. Starting from
This feature is not difficult to implement, first we have to find the path to this file. Then in the introduction of the third party class Phpzip this can be found on the Internet, I will post him out. A small partner in need can learn from it.
https://www.jianshu.com/p/46224d15fc5fFrom the function.Everyone is used to looking at the beginning, starting from the building goals, resulting in every document cooked is the previous part. Many tutorials are also a way to view their rough, from
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.