```
smtp.*.com 465 wo*PHTDUHTMCQVUWGQL*hua2011@*.com
LTAI5tK28QpAERYANJGkPMqt
pRs19fqtXT3PY8GVGR57oQMdn6PWPU
```
# **下载**
[PHPMailer/PHPMailer: The classic email sending library for PHP (github.com)](https://github.com/PHPMailer/PHPMailer)
```
composer require phpmailer/phpmailer
```
如果您不使用composer,则 可以将[PHPMailer 下载](https://github.com/PHPMailer/PHPMailer/archive/master.zip)为 zip 文件(请注意,文档和示例不包含在 zip 文件中),然后将 PHPMailer 文件夹的内容复制到 PHP 配置中指定的目录之一,并手动加载每个类文件:`include_path`
~~~html
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'path/to/PHPMailer/src/Exception.php';
require 'path/to/PHPMailer/src/PHPMailer.php';
require 'path/to/PHPMailer/src/SMTP.php';
~~~
如果未显式使用该类(可能没有),则不需要 SMTP 类的行。即使不使用异常,您仍然需要加载Exception类,因为它在内部使用。`SMTP``use``Exception`
# **示例**
[PHPMailer/mailing\_list.phps at master · PHPMailer/PHPMailer · GitHub](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps)
>[danger] 注意阿里云禁止了25端口,发送失败并返回`502 Bad Gateway`错误,所以我们需要ssl加密的465端口
首先需要下载PHPMailer类包:
```
<?php
require('class.phpmailer.php');
$mail = new PHPMailer(); //实例化
$mail->IsSMTP(); // 启用SMTP
$mail->Host = "smtp.163.com"; //SMTP服务器 163邮箱例子
//$mail->Host = "smtp.126.com"; //SMTP服务器 126邮箱例子
//$mail->Host = "smtp.qq.com"; //SMTP服务器 qq邮箱例子
$mail->Port = 25; //邮件发送端口 注意阿里云禁止了25端口需要465端口
$mail->SMTPAuth = true; //启用SMTP认证
$mail->CharSet = "UTF-8"; //字符集
$mail->Encoding = "base64"; //编码方式
$mail->Username = "abc@163.com"; //你的邮箱
$mail->Password = "xxx"; //你的密码
$mail->Subject = "xxx你好"; //邮件标题
$mail->From = "abc@163.com"; //发件人地址(也就是你的邮箱)
$mail->FromName = "xxx"; //发件人姓名
$address = "xxx@qq.com";//收件人email
$mail->AddAddress($address1, "xxx1"); //添加收件人1(地址,昵称)
$mail->AddAddress($address2, "xxx2"); //添加收件人2(地址,昵称)
$mail->AddAttachment('xx.xls','我的附件.xls'); // 添加附件,并指定名称
$mail->AddAttachment('xx1.xls','我的附件1.xls'); // 可以添加多个附件
$mail->AddAttachment('xx2.xls','我的附件2.xls'); // 可以添加多个附件
$mail->IsHTML(true); //支持html格式内容
$mail->AddEmbeddedImage("logo.jpg", "my-attach", "logo.jpg"); //设置邮件中的图片
$mail->Body = '你好, <b>朋友</b>! <br/>这是一封邮件!'; //邮件主体内容
//发送
if(!$mail->Send()) {
echo "发送失败: " . $mail->ErrorInfo;
} else {
echo "成功";
}
?>
```

```
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require './src/Exception.php';
require './src/PHPMailer.php';
require './src/SMTP.php';
$mail = new PHPMailer(true); // Passing `true` enables exceptions
try {
//服务器配置
$mail->CharSet ="UTF-8"; //设定邮件编码
$mail->SMTPDebug = 0; // 调试模式输出
$mail->isSMTP(); // 使用SMTP
$mail->Host = 'smtp.163.com'; // SMTP服务器
$mail->SMTPAuth = true; // 允许 SMTP 认证
$mail->Username = '邮箱用户名'; // SMTP 用户名 即邮箱的用户名
$mail->Password = '密码或者授权码'; // SMTP 密码 部分邮箱是授权码(例如163邮箱)
$mail->SMTPSecure = 'ssl'; // 允许 TLS 或者ssl协议
$mail->Port = 465; // 服务器端口 25 或者465 具体要看邮箱服务器支持
$mail->setFrom('xxxx@163.com', 'Mailer'); //发件人
$mail->addAddress('aaaa@126.com', 'Joe'); // 收件人
//$mail->addAddress('ellen@example.com'); // 可添加多个收件人
$mail->addReplyTo('xxxx@163.com', 'info'); //回复的时候回复给哪个邮箱 建议和发件人一致
//$mail->addCC('cc@example.com'); //抄送
//$mail->addBCC('bcc@example.com'); //密送
//发送附件
// $mail->addAttachment('../xy.zip'); // 添加附件
// $mail->addAttachment('../thumb-1.jpg', 'new.jpg'); // 发送附件并且重命名
//Content
$mail->isHTML(true); // 是否以HTML文档格式发送 发送后客户端可直接显示对应HTML内容
$mail->Subject = '这里是邮件标题' . time();
$mail->Body = '<h1>这里是邮件内容</h1>' . date('Y-m-d H:i:s');
$mail->AltBody = '如果邮件客户端不支持HTML则显示此内容';
$mail->send();
echo '邮件发送成功';
} catch (Exception $e) {
echo '邮件发送失败: ', $mail->ErrorInfo;
}
```

addStringAttachment与addAttachment的区别:
如果是资源二进制则用addStringAttachment,如果是已存在的文件的路径则用addAttachment发送
~~~
$output = $dompdf->output();
$pdf_file=file_put_contents("myfile.pdf", $output);
$mail->addAttachment($pdf_file, 'myfile.pdf');
$mail->addStringAttachment($dompdf->output(), 'my.pdf');
~~~
```
/**
* 将文件发送到邮箱
*/
public function emailpost(){
$file= "/xxx/ooo.jpg";
//后缀
$extension=pathinfo($file)['extension'];
$sendTo=Request::post('from');//发送的邮箱地址
$filename=Request::post('name');//发送的文件名
$filename=$filename.".".$extension;
if (file_exists($file)) {
try {
$mail = new \PHPMailer\PHPMailer\PHPMailer();
$arr = ['smtp_server'=>'stmp.163.com','smtp_port'=>25,...];
$config = convert_arr_kv($arr, 'name', 'value');
//检查是否邮箱格式
if (!is_email($sendTo)) {
return json(['error' => 1, 'msg' => '邮箱格式有误']);
}
//所有项目必须填写
if (empty($config['smtp_server']) || empty($config['smtp_port']) || empty($config['smtp_user']) || empty($config['smtp_pwd'])) {
return json(['error' => 1, 'msg' => '请完善邮件配置信息!']);
}
// 组装发送数据
$mail->CharSet = 'UTF-8'; //设定邮件编码,默认ISO-8859-1,如果发中文此项必须设置,否则乱码
$mail->isSMTP();
$mail->SMTPDebug = 0;
//调试输出格式
//$mail->Debugoutput = 'html';
//smtp服务器
$mail->Host = $config['smtp_server'];
//端口 - likely to be 25, 465 or 587
$mail->Port = $config['smtp_port'];
//由于阿里云禁止了25端口,这里我们就需要换成465,同时兼容25端口和465端口
if ($mail->Port == '465') {
$mail->SMTPSecure = 'ssl';
}// 使用安全协议
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
//发送邮箱
$mail->Username = $config['smtp_user'];
//密码
$mail->Password = $config['smtp_pwd'];
//设置发送对象 (发送邮箱,发送人名称)
$mail->setFrom($config['smtp_user'], $config['email_id']);
//回复地址
// $mail->addReplyTo($config['smtp_user'], $config['email_id']);
//接收邮件方
if (is_array($sendTo)) {
foreach ($sendTo as $v) {
$mail->addAddress($v);
}
} else {
//addAddress(地址,昵称)群发可多次调用
$mail->addAddress($sendTo);
}
//$mail->AddAttachment('xx.xls','我的附件.xls'); // 添加附件,并指定名称
if (!$mail->AddAttachment($file, $filename)) {
return json(['error' => 1, 'msg' => '附件发送失败!']);
}
$mail->isHTML(true);// send as HTML
//标题
$mail->Subject = "文件下载";
$content="文件下载".$filename;//这里可以是html代码
//HTML内容转换
$mail->msgHTML($content);
if (!$mail->send()) {
$error_msg = 'Mailer Error: ' . $mail->ErrorInfo;
return json(['error' => 1, 'msg' => $error_msg]);
}
return json(['error' => 0, 'msg' => $filename.'发送成功!']);
} catch (\Exception $e) {
$msginfo=$mail->ErrorInfo?:$e->getMessage();
$error_msg = 'Mailer Error: ' . $msginfo;
return json(['error' => 1, 'msg' => $error_msg]);
}
}else{
return json(['error' => 1, 'msg' => '找不到该文件!']);
}
}
}
```
# **邮箱配置**
**网易邮箱配置如下图:**

**QQ 邮箱相关配置如下图:**
| 邮箱 | POP3服务器(端口995) | SMTP服务器(端口465或587) |
| --- | --- | --- |
| qq.com | pop.qq.com | smtp.qq.com |
```
sina.com:
POP3服务器地址:pop3.sina.com.cn(端口:110) SMTP服务器地址:smtp.sina.com.cn(端口:25)
sinaVIP:
POP3服务器:pop3.vip.sina.com (端口:110) SMTP服务器:smtp.vip.sina.com (端口:25)
sohu.com:
POP3服务器地址:pop3.sohu.com(端口:110) SMTP服务器地址:smtp.sohu.com(端口:25)
126邮箱:
POP3服务器地址:pop.126.com(端口:110) SMTP服务器地址:smtp.126.com(端口:25)
139邮箱:
POP3服务器地址:POP.139.com(端口:110) SMTP服务器地址:SMTP.139.com(端口:25)
163.com:
POP3服务器地址:pop.163.com(端口:110) SMTP服务器地址:smtp.163.com(端口:25)
QQ邮箱
POP3服务器地址:pop.qq.com(端口:110)
SMTP服务器地址:smtp.qq.com (端口:25)
QQ企业邮箱
POP3服务器地址:pop.exmail.qq.com (SSL启用 端口:995) SMTP服务器地址:smtp.exmail.qq.com(SSL启用 端口:587/465)
yahoo.com:
POP3服务器地址:pop.mail.yahoo.com SMTP服务器地址:smtp.mail.yahoo.com
yahoo.com.cn:
POP3服务器地址:pop.mail.yahoo.com.cn(端口:995) SMTP服务器地址:smtp.mail.yahoo.com.cn(端口:587
```
限制:
网易163邮箱一封邮件最多发送给 40 个收件人 , 每天发送限额为 50 封。
网易邮箱每天发邮箱限额数量详情:
1、企业邮箱
单个用户每天最多只能发送 1000 封邮件,单个邮件最多包含 500 个收件人邮箱地址。
2、163VIP邮箱
每天限制最多能发送800封邮件。
3、163 、 126 、 yeah 的邮箱
一封邮件最多发送给 40 个收件人 , 每天发送限额为 50 封。
其他不同邮箱每日发送邮箱限额说明:
1、盈世企业邮箱登录(原尚易企业邮箱)
一个邮箱账号一分钟最多发送400个邮件地址,一封邮件最多200个邮件地址,如果一封邮件包括200个收信人地址,一分钟最多不能超过 2 封邮件;如果一封邮件只有一个收信人地址 , 一分钟发送的邮件不能超过6封。
2、QQ邮箱
(1)2G的普通用户每天最大发信量是100封。
(2)3G会员、移动QQ 、QQ行及4G大肚邮用户每天最大发信量是500封。
(4)Foxmail免费邮箱每天发送量限制为50封 。
3、Gmail邮箱
邮件数量限制为每天 500 封,新申请的邮箱每天发送量限制50封 。
4、新浪邮箱
企业邮箱试用期用户每天限制80封,购买后发信没有限制。新浪免费邮箱,每天限制发送 30 封 。
5、雅虎免费邮箱
每小时发送量限制为100封,每天发送量限制为200封。
6、阿里巴巴英文站提高的企业邮箱
单个用户每天发送200封邮件 ,一天超过200封可能被系统自动冻结 。
## **API**
CHARSET_ASCII = 'us-ascii'
CHARSET_ISO88591= 'iso-8859-1'
CHARSET_UTF8 = 'utf-8'
CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'
CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'
CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'
CONTENT_TYPE_PLAINTEXT = 'text/plain'
CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'
CONTENT_TYPE_TEXT_HTML = 'text/html'
CRLF = "\r\n" SMTP标准CRLF换行
ENCODING_7BIT = '7bit'
ENCODING_8BIT = '8bit'
ENCODING_BASE64 = 'base64'
ENCODING_BINARY = 'binary'
ENCODING_QUOTED_PRINTABLE = 'quoted-printable'
ENCRYPTION_SMTPS = 'ssl'
ENCRYPTION_STARTTLS = 'tls'
FWS = ' ' “折叠空白”是一种用于线折叠的空白字符串
ICAL_METHOD_ADD = 'ADD'
ICAL_METHOD_CANCEL = 'CANCEL'
ICAL_METHOD_COUNTER = 'COUNTER'
ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'
ICAL_METHOD_PUBLISH = 'PUBLISH'
ICAL_METHOD_REFRESH = 'REFRESH'
ICAL_METHOD_REPLY = 'REPLY'
ICAL_METHOD_REQUEST = 'REQUEST'
MAIL_MAX_LINE_LENGTH = 63 mail()支持的最大行长度
MAX_LINE_LENGTH = 998 RFC 2822第2.1.1节允许的最大行长度
STD_LINE_LENGTH = 76 RFC 2822第2.1.1节允许的较低的最大行长度
STOP_CONTINUE = 1 错误严重程度: 消息,可能确定继续处理
STOP_CRITICAL = 2 错误严重程度: 消息,加上完全停止,达到严重错误
STOP_MESSAGE = 0 错误严重性: 仅消息,继续处理
VERSION = '6.8.0' phpmail版本号
### 属性
$action_function : string
>[info]回调函数名
$AllowEmpty : bool
>[info]是否允许发送空消息体
$AltBody : string
>[info]纯文本消息主体
$AuthType : string
>[info]SMTP身份验证类型。选项有:CRAM-MD5、LOGIN、PLAIN、XOAUTH2。
$Body : string
>[info]HTML或纯文本消息正文
$CharSet : string
>[info]消息的字符集
$ConfirmReadingTo : string
>[info]The email address that a reading confirmation should be sent to, also known as read receipt.
$ContentType : string
>[info]The MIME Content-type of the message.
$Debugoutput : string|callable|LoggerInterface
>[info]How to handle debug output.
$DKIM_copyHeaderFields : bool
>[info]DKIM Copy header field values for diagnostic use.
$DKIM_domain : string
>[info]DKIM signing domain name.
$DKIM_extraHeaders : array<string|int, mixed>
>[info]DKIM Extra signing headers.
$DKIM_identity : string
>[info]DKIM Identity.
$DKIM_passphrase : string
>[info]DKIM passphrase.
$DKIM_private : string
>[info]DKIM private key file path.
$DKIM_private_string : string
>[info]DKIM private key string.
$DKIM_selector : string
>[info]DKIM selector.
$do_verp : bool
>[info]Whether to generate VERP addresses on send.
$dsn : mixed
>[info]Comma separated list of DSN notifications 'NEVER' under no circumstances a DSN must be returned to the sender.
$Encoding : string
>[info]The message encoding.
$ErrorInfo : string
>[info]Holds the most recent mailer error message.
$From : string
>[info]The From email address for the message.
$FromName : string
>[info]The From name of the message.
$Helo : string
>[info]The SMTP HELO/EHLO name used for the SMTP connection.
$Host : string
>[info]SMTP hosts.
$Hostname : string
>[info]The hostname to use in the Message-ID header and as default HELO string.
$Ical : string
>[info]An iCal message part body.
$Mailer : string
>[info]Which method to use to send mail.
$MessageDate : string
>[info]The message Date to be used in the Date header.
$MessageID : string
>[info]An ID to be used in the Message-ID header.
$Password : string
>[info]SMTP password.
$Port : int
>[info]The default SMTP server port.
$Priority : int|null
>[info]Email priority.
$Sender : string
>[info]The envelope sender of the message.
$Sendmail : string
>[info]The path to the sendmail program.
$SingleTo : bool
>[info]Whether to split multiple to addresses into multiple messages or send them all in one message.
$SMTPAuth : bool
>[info]Whether to use SMTP authentication.
$SMTPAutoTLS : bool
>[info]Whether to enable TLS encryption automatically if a server supports it, even if `SMTPSecure` is not set to 'tls'.
$SMTPDebug : int
>[info]SMTP class debug output mode.
$SMTPKeepAlive : bool
>[info]Whether to keep the SMTP connection open after each message.
$SMTPOptions : array<string|int, mixed>
>[info]Options array passed to stream_context_create when connecting via SMTP.
$SMTPSecure : string
>[info]What kind of encryption to use on the SMTP connection.
$Subject : string
>[info]The Subject of the message.
$Timeout : int
>[info]The SMTP server timeout in seconds.
$Username : string
>[info]SMTP username.
$UseSendmailOptions : bool
>[info]Whether mail() uses a fully sendmail-compatible MTA.
$validator : string|callable
>[info]Which validator to use by default when validating email addresses.
$WordWrap : int
>[info]Word-wrap the message body to this number of chars.
$XMailer : string|null
>[info]What to put in the X-Mailer header.
$all_recipients : array<string|int, mixed>
>[info]An array of all kinds of addresses.
$attachment : array<string|int, mixed>
>[info]The array of attachments.
$bcc : array<string|int, mixed>
>[info]The array of 'bcc' names and addresses.
$boundary : array<string|int, mixed>
>[info]The array of MIME boundary strings.
$cc : array<string|int, mixed>
>[info]The array of 'cc' names and addresses.
$CustomHeader : array<string|int, mixed>
>[info]The array of custom headers.
$error_count : int
>[info]The number of errors encountered.
$exceptions : bool
>[info]Whether to throw exceptions for errors.
$IcalMethods : array<string|int, string>
>[info]Value-array of "method" in Contenttype header "text/calendar"
$language : array<string|int, mixed>
>[info]The array of available text strings for the current language.
$lastMessageID : string
>[info]The most recent Message-ID (including angular brackets).
$LE : string
>[info]SMTP RFC standard line ending; Carriage Return, Line Feed.
$mailHeader : string
>[info]Extra headers that createHeader() doesn't fold in.
$message_type : string
>[info]The message's MIME type.
$MIMEBody : string
>[info]The complete compiled MIME message body.
$MIMEHeader : string
>[info]The complete compiled MIME message headers.
$oauth : OAuthTokenProvider
>[info]An implementation of the PHPMailer OAuthTokenProvider interface.
$RecipientsQueue : array<string|int, mixed>
>[info]An array of names and addresses queued for validation.
$ReplyTo : array<string|int, mixed>
>[info]The array of reply-to names and addresses.
$ReplyToQueue : array<string|int, mixed>
>[info]An array of reply-to names and addresses queued for validation.
$sign_cert_file : string
>[info]The S/MIME certificate file path.
$sign_extracerts_file : string
>[info]The optional S/MIME extra certificates ("CA Chain") file path.
$sign_key_file : string
>[info]The S/MIME key file path.
$sign_key_pass : string
>[info]The S/MIME password for the key.
$SingleToArray : array<string|int, mixed>
>[info]Storage for addresses when SingleTo is enabled.
$smtp : SMTP
>[info]An instance of the SMTP sender class.
$to : array<string|int, mixed>
>[info]The array of 'to' names and addresses.
$uniqueid : string
>[info]Unique ID used for message ID and boundaries.
### 方法
__construct() : mixed
>[info]Constructor.
__destruct() : mixed
>[info]Destructor.
_mime_types() : string
>[info]Get the MIME type for a file extension.
addAddress() : bool
>[info]Add a "To" address.
addAttachment() : bool
>[info]Add an attachment from a path on the filesystem.
addBCC() : bool
>[info]Add a "BCC" address.
addCC() : bool
>[info]Add a "CC" address.
addCustomHeader() : bool
>[info]Add a custom header.
addEmbeddedImage() : bool
>[info]Add an embedded (inline) attachment from a file.
addrAppend() : string
>[info]Create recipient headers.
addReplyTo() : bool
>[info]Add a "Reply-To" address.
addrFormat() : string
>[info]Format an address for use in a message header.
addStringAttachment() : bool
>[info]Add a string or binary attachment (non-filesystem).
addStringEmbeddedImage() : bool
>[info]Add an embedded stringified attachment.
alternativeExists() : bool
>[info]Check if this message has an alternative body set.
attachmentExists() : bool
>[info]Check if an attachment (non-inline) is present.
base64EncodeWrapMB() : string
>[info]Encode and wrap long multibyte strings for mail headers without breaking lines within a character.
clearAddresses() : mixed
>[info]Clear all To recipients.
clearAllRecipients() : mixed
>[info]Clear all recipient types.
clearAttachments() : mixed
>[info]Clear all filesystem, string, and binary attachments.
clearBCCs() : mixed
>[info]Clear all BCC recipients.
clearCCs() : mixed
>[info]Clear all CC recipients.
clearCustomHeaders() : mixed
>[info]Clear all custom headers.
clearQueuedAddresses() : mixed
>[info]Clear queued addresses of given kind.
clearReplyTos() : mixed
>[info]Clear all ReplyTo recipients.
createBody() : string
>[info]Assemble the message body.
createHeader() : string
>[info]Assemble message headers.
DKIM_Add() : string
>[info]Create the DKIM header and body in a new message header.
DKIM_BodyC() : string
>[info]Generate a DKIM canonicalization body.
DKIM_HeaderC() : string
>[info]Generate a DKIM canonicalization header.
DKIM_QP() : string
>[info]Quoted-Printable-encode a DKIM header.
DKIM_Sign() : string
>[info]Generate a DKIM signature.
encodeHeader() : string
>[info]Encode a header value (not including its label) optimally.
encodeQ() : string
>[info]Encode a string using Q encoding.
encodeQP() : string
>[info]Encode a string in quoted-printable format.
encodeString() : string
>[info]Encode a string in requested format.
filenameToType() : string
>[info]Map a file name to a MIME type.
getAllRecipientAddresses() : array<string|int, mixed>
>[info]Allows for public read access to 'all_recipients' property.
getAttachments() : array<string|int, mixed>
>[info]Return the array of attachments.
getBccAddresses() : array<string|int, mixed>
>[info]Allows for public read access to 'bcc' property.
getBoundaries() : array<string|int, mixed>
>[info]Get the boundaries that this message will use
getCcAddresses() : array<string|int, mixed>
>[info]Allows for public read access to 'cc' property.
getCustomHeaders() : array<string|int, mixed>
>[info]Returns all custom headers.
getLastMessageID() : string
>[info]Return the Message-ID header of the last email.
getLE() : string
>[info]Return the current line break format string.
getMailMIME() : string
>[info]Get the message MIME type headers.
getOAuth() : OAuthTokenProvider
>[info]Get the OAuthTokenProvider instance.
getReplyToAddresses() : array<string|int, mixed>
>[info]Allows for public read access to 'ReplyTo' property.
getSentMIMEMessage() : string
>[info]Returns the whole MIME message.
getSMTPInstance() : SMTP
>[info]Get an instance to use for SMTP operations.
getToAddresses() : array<string|int, mixed>
>[info]Allows for public read access to 'to' property.
getTranslations() : array<string|int, mixed>
>[info]Get the array of strings for the current language.
has8bitChars() : bool
>[info]Does a string contain any 8-bit chars (in any charset)?
hasLineLongerThanMax() : bool
>[info]Detect if a string contains a line longer than the maximum line length allowed by RFC 2822 section 2.1.1.
hasMultiBytes() : bool
>[info]Check if a string contains multi-byte characters.
headerLine() : string
>[info]Format a header line.
html2text() : string
>[info]Convert an HTML string into plain text.
idnSupported() : bool
>[info]Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the `intl` and `mbstring` PHP extensions.
inlineImageExists() : bool
>[info]Check if an inline attachment is present.
isError() : bool
>[info]Check if an error occurred.
isHTML() : mixed
>[info]Sets message type to HTML or plain.
isMail() : mixed
>[info]Send messages using PHP's mail() function.
isQmail() : mixed
>[info]Send messages using qmail.
isSendmail() : mixed
>[info]Send messages using $Sendmail.
isSMTP() : mixed
>[info]Send messages using SMTP.
isValidHost() : bool
>[info]Validate whether a string contains a valid value to use as a hostname or IP address.
mb_pathinfo() : string|array<string|int, mixed>
>[info]Multi-byte-safe pathinfo replacement.
msgHTML() : string
>[info]Create a message body from an HTML string.
normalizeBreaks() : string
>[info]Normalize line breaks in a string.
parseAddresses() : array<string|int, mixed>
>[info]Parse and validate a string containing one or more RFC822-style comma-separated email addresses of the form "display name <address>" into an array of name/address pairs.
postSend() : bool
>[info]Actually send a message via the selected mechanism.
preSend() : bool
>[info]Prepare a message for sending.
punyencodeAddress() : string
>[info]Converts IDN in given email address to its ASCII form, also known as punycode, if possible.
quotedString() : string
>[info]If a string contains any "special" characters, double-quote the name, and escape any double quotes with a backslash.
rfcDate() : string
>[info]Return an RFC 822 formatted date.
secureHeader() : string
>[info]Strip newlines to prevent header injection.
send() : bool
>[info]Create a message and send it.
set() : bool
>[info]Set or reset instance properties.
setBoundaries() : void
>[info]Set the boundaries to use for delimiting MIME parts.
setFrom() : bool
>[info]Set the From and FromName properties.
setLanguage() : bool
>[info]Set the language for error messages.
setOAuth() : mixed
>[info]Set an OAuthTokenProvider instance.
setSMTPInstance() : SMTP
>[info]Provide an instance to use for SMTP operations.
setWordWrap() : mixed
>[info]Apply word wrapping to the message body.
sign() : mixed
>[info]Set the public and private key files and password for S/MIME signing.
smtpClose() : mixed
>[info]Close the active SMTP session if one exists.
smtpConnect() : bool
>[info]Initiate a connection to an SMTP server.
stripTrailingBreaks() : string
>[info]Strip trailing line breaks from a string.
stripTrailingWSP() : string
>[info]Remove trailing whitespace from a string.
textLine() : string
>[info]Return a formatted mail line.
utf8CharBoundary() : int
>[info]Find the last character boundary prior to $maxLength in a utf-8 quoted-printable encoded string.
validateAddress() : bool
>[info]Check that a string looks like an email address.
wrapText() : string
>[info]Word-wrap message.
addAnAddress() : bool
>[info]Add an address to one of the recipient arrays or to the ReplyTo array.
addOrEnqueueAnAddress() : bool
>[info]Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still be modified after calling this function), addition of such addresses is delayed until send().
attachAll() : string
>[info]Attach all file, string, and binary attachments to the message.
cidExists() : bool
>[info]Check if an embedded attachment is present with this cid.
doCallback() : mixed
>[info]Perform a callback.
edebug() : mixed
>[info]Output debugging info via a user-defined method.
encodeFile() : string
>[info]Encode a file attachment in requested format.
endBoundary() : string
>[info]Return the end of a message boundary.
fileIsAccessible() : bool
>[info]Check whether a file path is safe, accessible, and readable.
generateId() : string
>[info]Create a unique ID to use for boundaries.
getBoundary() : string
>[info]Return the start of a message boundary.
isPermittedPath() : bool
>[info]Check whether a file path is of a permitted type.
isShellSafe() : bool
>[info]Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
lang() : string
>[info]Get an error message in the current language.
mailSend() : bool
>[info]Send mail using the PHP mail() function.
sendmailSend() : bool
>[info]Send mail using the $Sendmail program.
serverHostname() : string
>[info]Get the server hostname.
setError() : mixed
>[info]Add an error message to the error container.
setLE() : mixed
>[info]Set the line break format string, e.g. "\r\n".
setMessageType() : mixed
>[info]Set the message type.
smtpSend() : bool
>[info]Send mail via SMTP.
validateEncoding() : bool
>[info]Validate encodings.
getSmtpErrorMessage() : string
>[info]Build an error message starting with a generic one and adding details if possible.
mailPassthru() : bool
>[info]Call mail() in a safe_mode-aware fashion.
- php更新内容
- PHP PSR 标准规范
- 辅助查询(*)
- 实用小函数
- composer项目的创建
- composer安装及设置
- composer自动加载讲解
- phpsdudy的composer操作
- 更换compoer镜像源
- 下载包与删除包
- git
- 安装以及配置公钥
- 手动添加Git Bash Here到右键菜单
- 第一次使用git要配置github远程仓库
- 代码上传到gitee
- Git代码同时上传到GitHub和Gitee(码云)
- Git - 多人协同开发利器,团队协作流程规范与注意事项
- 删除远程仓库的文件
- github查询方法
- 错误
- git clean
- 解决github release下载慢的问题
- 其他
- php.ini
- 缓冲函数ob_start()
- php配置可修改范围
- php超时
- 防跨目录设置
- 函数可变参数
- 匿名函数(闭包函数:closures)
- PHP CLI模式开发(命令行开发)
- 【时间】操作
- 常用时间函数
- 时间函数例子
- Date/Time 函数(不包含别名函数)
- DateTime类别名函数
- 【数字】及【数学】操作
- 【字符串】操作
- 常见用法
- 【数组】操作
- 排序
- 合并与累加案例
- 重组
- foreach引用传值注意点
- 判断数组a是否完全属于数组b
- 数组指针操作
- 【正则】
- php正则函数
- 特殊符号
- 模式修正符
- 去除文本中的html、xml的标签
- \r\n
- 分组
- 断言(环视?)
- 条件表达式
- 递归表达式 (?R)
- 固化分组
- 正则例子
- 提取类文件的公共方法
- 抓取网页内容
- 匹配中文字符
- 提取sql日志文件
- 框架
- xpath匹配
- 【文件】操作
- 自动加载spl_autoload_register
- 文件加载
- 文件的上传
- 将字节转为人可读的单位
- 文件上传相关设置
- 常见的mimi类型
- 文件断点续传
- 文件下载(防盗链+大文件+断点续传)
- 破解防盗链
- 即时通讯与php网络相关(websocket,workman,swoole,curl)
- 网络编程基本概念
- socket套接字和streams流
- socket
- 使用websocket实现php消息实时推送完整示例
- streams
- Stream函数实现websocket
- swoole+Workman笔记
- Workman相关
- 启动停止
- Worker
- Connection
- TcpConnection
- AsyncTcpConnection类
- UdpConnection
- AsyncUdpConnection
- Timer
- Autoloader
- 协议(Protocols)
- Http服务
- 响应Response
- session会话
- session管理
- SSE(服务端推送技术)
- websocket
- tcp
- udp
- 其它
- text
- frame
- unix domain
- 定制协议
- workerman协程(workerman>=5.1.0,php>=8.2)
- wokerman实例
- workerman实现微信公众号带参数二维码扫码识别用户
- 服务端和客户端
- workerman其它实例
- Work类
- 设置transport开启ssl,websocket+ssl即wss
- 多端口(多协议)监听
- 详细用法
- 全局的eventloop
- Timer定时器类
- pipeTCP代理
- 事件循环
- workman示例
- 使用workerman实现基于UDP的异步SIP服务器,服务器端可主动发送UDP数据给客户端
- swoole相关
- 安装及常用Cli操作
- TCP
- 4种回调函数的写法
- easyswoole
- 目录结构
- 配置文件
- swoole
- curl封装
- curl参数
- php支持的协议和封装协议(如http,php://input)
- php://协议
- file://协议
- http(s)://协议
- ftp(s)://协议
- zip://, bzip2://, zlib://协议
- data://协议
- glob://协议
- expect://协议
- phar://
- ssh2
- rar://
- ogg://
- 上下文(Context)选项和参数(用于所有的文件系统或数据流封装协议)
- 过滤器
- http请求及模拟登录
- 常用的header头部定义汇总
- HTTP响应头和请求头信息对照表
- HTTP请求的返回值含义说明
- content-type对照表
- Cache-Control对照
- curl函数
- 防止页面刷新
- telnet模拟get、post请求
- 三种方式模拟表单发布留言
- 模拟登陆
- 防盗链
- php+mysql模拟队列发送邮件
- WebSocket JavaScript API
- 进程/线程/协程
- 协程
- 什么是协程
- web通讯(轮询、长连接、websocket)
- 轮询(Event Loop)
- WebSocket
- socket.io(对 WebSocket 的封装)
- 邮件发送
- PHPMailer
- 短信验证码
- 短信宝
- 阿里云短信(新版)
- 短信API
- 原版
- 异常处理
- 显示全部错误
- 异常分类
- php系统异常
- 错误级别
- set_error_handler
- set_exception_handler
- register_shutdown_function
- try catch
- tp5异常处理类解析
- 字符串中的变量解析
- url与文件路径
- empty、isset、is_null
- echo 输出bool值
- if真假情况
- 流程控制代替语法【if (条件): endif;】
- 三元运算
- 运算符优先级
- 常量
- define与const(php5.3) 类常量
- 递归
- 单元测试
- 面向对象
- 对象(object) 与 数组(array) 的转换
- 全局变量域超全局变量
- 超全局变量
- $_ENV :存储了一些系统的环境变量
- $_COOKIE
- $_SESSION
- $_FILES
- $_SERVER
- 无限分类
- 图片操作
- 视频分段加载
- 隐藏地址
- MPEG DASH视频分片技术
- phpDoc注释
- @错误抑制符
- 字符编码
- CGI、FastCGI和PHP-FPM关系图解
- No input file specified的解决方法
- SAPI(PHP常见的四种运行模式)
- assert断言
- 程序执行
- 引用&
- Heredoc和Nowdoc语法
- 可变数量的参数(php5.6)
- 移动端判断函数
- PHP分批次处理数据
- 类基础
- 系统预定义类
- pdo
- 类的三大特性:封装,继承,多态
- 魔术方法
- extends继承
- abstract 抽象类
- interface 接口(需要implements实现)
- 抽象类和接口的区别
- 多态
- static
- final
- serialize与unserialize
- instanceof 判断后代子类
- 类型约束
- clone克隆
- ::的用法
- static::class、self::class
- new self()与new static()
- this、self、static、parent、super
- self、static、parent:后期静态绑定
- PHP的静态变量
- php导入
- trait
- 动态调用类方法
- 参数及类型申明
- 方法的重载覆盖
- return $a && $b
- 类型声明
- 设计思想
- 思路流程
- 六大原则(单里依赖迪米开接口)
- 单一职责原则(SRP)
- 里氏替换原则(LSP)
- 依赖倒置原则(DIP)
- 接口隔离原则(ISP)
- 迪米特法则(LoD)
- 开闭原则(OCP)
- 依赖注入与依赖倒置
- MVC模式与模板引擎
- 模版引擎
- smarty模版
- 系统变量、全局变量
- 语言切换
- 函数-给函数默认值
- 流程控制-遍历
- 模版加载
- 模版继承
- blade
- twig
- Plates
- 创建型模式(创建类对象)--单原二厂建
- (*)单例模式(保证一个类仅有一个实例)
- (*)工厂模式(自动实例化想要的类)
- 原型模式(在指定方法里克隆this)
- 创建者模式(建造者类组装近似类属性,购物车)
- 结构型模式 --桥(帮)组享外带装适
- 适配器模式(Adapter 用于接口兼容)
- 桥接模式(方法相同的不同类之间的快速切换)
- 装饰模式(动态增加类对象的功能 如游戏角色的装备)
- 组合模式(用于生成类似DOMDocument这种节点类,或者游戏相关)
- 外观模式(门面(Facade)模式 不同类的统一调用)
- 享元模式
- 代理模式(委托模式)
- 行为型模式--观摩职命状-备爹在房中洁厕
- (*)观察者模式(例如插件)
- 模板方法模式 Template
- 职责链模式 (Chainof Responsibility)
- 命令模式(Command)
- 状态模式(State)
- (*)迭代器模式(Iterator)
- 已知模式-备忘录模式(Memento)
- 深度模式-访问者模式(Visitor)
- 中介者模式(Mediator)
- 深度模式-解释器模式(Interpreter)
- 策略模式(Strategy)
- (*)注册树(注射器、注册表、数据中心)模式
- 【函数参考】及【扩展列表】
- PHP扩展库列表
- 影响 PHP 行为的扩展
- APC扩展(过时)
- APCu扩展
- APD扩展(过时)
- bcompiler扩展(过时)
- BLENC扩展 (代码加密 实验型)
- Componere扩展(7.1+)
- Componere\Definition
- Componere\Patch
- Componere \ Method
- Componere\Value
- Componere函数
- 错误处理扩展(PHP 核心)
- FFI扩展
- 基本FFI用法
- FFI api
- htscanner扩展
- inclued扩展
- Memtrack扩展
- OPcache扩展(5.5.0内部集成)
- Output Control扩展(核心)
- PHP Options/Info扩展(核心)
- 选项、 信息函数
- phpdbg扩展(5.6+内部集成)
- runkit扩展
- runkit7扩展
- scream扩展
- uopz扩展
- Weakref扩展
- WeakRef
- WeakMap
- WinCache扩展
- Xhprof扩展
- Yac(7.0+)
- 音频格式操作
- ID3
- KTaglib
- oggvorbis
- OpenAL
- 身份认证服务
- KADM5
- Radius
- 针对命令行的扩展
- Ncurses(暂无人维护)
- Newt(暂无人维护)
- Readline
- 压缩与归档扩展
- Bzip2
- LZF
- Phar
- Rar
- Zip
- Zlib
- 信用卡处理
- 加密扩展
- Crack(停止维护)
- CSPRNG(核心)
- Hash扩展(4.2内置默认开启、7.4核心)
- Mcrypt(7.2移除)
- Mhash(过时)
- OpenSSL(*)
- 密码散列算法(核心)
- Sodium(+)
- 数据库扩展
- 数据库抽象层
- DBA
- dbx
- ODBC
- PDO(*)
- 针对各数据库系统对应的扩展
- CUBRID
- DB++(实验性)
- dBase
- filePro
- Firebird/InterBase
- FrontBase
- IBM DB2
- Informix
- Ingres
- MaxDB
- Mongo(MongoDB老版本)
- MongoDB
- mSQL
- Mssql
- MySQL
- OCI8(Oracle OCI8)
- Paradox
- PostgreSQL
- SQLite
- SQLite3
- SQLSRV(SQL Server)
- Sybase
- tokyo_tyrant
- 日期与时间相关扩展
- Calendar
- 日期/时间(核心)
- HRTime(*)
- 文件系统相关扩展
- Direct IO
- 目录(核心)
- Fileinfo(内置)
- 文件系统(核心)
- Inotify
- Mimetype(过时)
- Phdfs
- Proctitle
- xattr
- xdiff
- 国际化与字符编码支持
- Enchant
- FriBiDi
- Gender
- Gettext
- iconv(内置默认开启)
- intl
- 多字节字符串(mbstring)
- Pspell
- Recode(将要过时)
- 图像生成和处理
- Cairo
- Exif
- GD(内置)
- Gmagick
- ImageMagick
- 邮件相关扩展
- Cyrus
- IMAP
- Mail(核心)
- Mailparse
- vpopmail(实验性 )
- 数学扩展
- BC Math
- GMP
- Lapack
- Math(核心)
- Statistics
- Trader
- 非文本内容的 MIME 输出(PDF、excel等文件操作)
- FDF
- GnuPG
- haru(实验性)
- Ming(实验性)
- wkhtmltox(*)
- PS
- RPM Reader(停止维护)
- RpmInfo
- XLSWriter Excel大文件读取写入操作(*)
- php第三方库非扩展
- 进程控制扩展
- Eio
- Ev
- Expect
- Libevent
- PCNTL
- POSIX
- 程序执行扩展(核心)
- parallel
- pthreads(*)
- pht
- Semaphore
- Shared Memory
- Sync
- 其它基本扩展
- FANN
- GeoIP(*)
- JSON(内置)
- Judy
- Lua
- LuaSandbox
- Misc(核心)
- Parsekit
- SeasLog(-)
- SPL(核心)
- SPL Types(实验性)
- Streams(核心)
- stream_wrapper_register
- stream_register_wrapper(同上别名)
- stream_context_create
- stream_socket_client
- stream_socket_server
- stream_socket_accept
- stream_socket_recvfrom
- stream_socket_sendto
- Swoole(*)
- Tidy扩展
- Tokenizer
- URLs(核心)
- V8js(*)
- Yaml
- Yaf
- Yaconf(核心)
- Taint(检测xss字符串等)
- Data Structures
- Igbinary(7.0+)
- 其它服务
- 网络(核心)
- Sockets
- socket_create
- socket_bind(服务端即用于监听的套接字)
- socket_listen(服务端)
- socket_accept(服务端)
- socket_connect(客户端)
- socket_read
- socket_recv(类似socket_read)
- socket_write
- socket_send
- socket_close
- socket_select
- socket_getpeername
- socket_getsockname
- socket_get_option
- socket_getopt(socket_get_option的别名)
- socket_set_option
- socket_setopt( socket_set_option的别名)
- socket_recvfrom
- socket_sendto
- socket_addrinfo_bind
- socket_addrinfo_connect
- socket_addrinfo_explain
- socket_addrinfo_lookup
- socket_clear_error
- socket_last_error
- socket_strerror
- socket_cmsg_space
- socket_create_listen
- socket_create_pair
- socket_export_stream
- socket_import_stream
- socket_recvmsg
- socket_sendmsg
- socket_set_block
- socket_set_nonblock
- socket_shutdown
- socket_wsaprotocol_info_export
- socket_wsaprotocol_info_import
- socket_wsaprotocol_info_release
- cURL(*)
- curl_setopt
- Event(*)
- chdb
- FAM
- FTP
- Gearman
- Gopher
- Gupnp
- Hyperwave API(过时)
- LDAP(+)
- Memcache
- Memcached(+)
- mqseries
- RRD
- SAM(消息队列,没有维护)
- ScoutAPM
- SNMP
- SSH2
- Stomp
- SVM
- SVN(试验性的)
- TCP扩展
- Varnish
- YAZ
- YP/NIS
- 0MQ(ZeroMQ、ZMQ)消息系统
- 0mq例子
- ZooKeeper
- 搜索引擎扩展
- mnoGoSearch
- Solr
- Sphinx
- Swish(实验性)
- 针对服务器的扩展
- Apache
- FastCGI 进程管理器
- IIS
- NSAPI
- Session 扩展
- Msession
- Sessions
- Session PgSQL
- 文本处理
- BBCode
- CommonMark(markdown解析)
- cmark函数
- cmark类
- Parser
- CQL
- IVisitor接口
- Node基类与接口
- Document
- Heading(#)
- Paragraph
- BlockQuote
- BulletList
- OrderedList
- Item
- Text
- Strong
- Emphasis
- ThematicBreak
- SoftBreak
- LineBreak
- Code
- CodeBlock
- HTMLBlock
- HTMLInline
- Image
- Link
- CustomBlock
- CustomInline
- Parle
- 类函数
- PCRE( 核心)
- POSIX Regex
- ssdeep
- 字符串(核心)
- 变量与类型相关扩展
- 数组(核心)
- 类/对象(核心)
- Classkit(未维护)
- Ctype
- Filter扩展
- 过滤器函数
- 函数处理(核心)
- quickhash扩展
- 反射扩展(核心)
- Variable handling(核心)
- Web 服务
- OAuth
- api
- 例子:
- SCA(实验性)
- SOAP
- Yar
- XML-RPC(实验性)
- Windows 专用扩展
- COM
- 额外补充:Wscript
- win32service
- win32ps(停止更新且被移除)
- XML 操作(也可以是html)
- libxml(内置 默认开启)
- DOM(内置,默认开启)
- xml介绍
- 扩展类与函数
- DOMNode
- DOMDocument(最重要)
- DOMAttr
- DOMCharacterData
- DOMText(文本节点)
- DOMCdataSection
- DOMComment(节点注释)
- DOMDocumentFragment
- DOMDocumentType
- DOMElement
- DOMEntity
- DOMEntityReference
- DOMNotation
- DOMProcessingInstruction
- DOMXPath
- DOMException
- DOMImplementation
- DOMNamedNodeMap
- DOMNodeList
- SimpleXML(内置,5.12+默认开启)
- XMLReader(5.1+内置默认开启 用于处理大型XML文档)
- XMLWriter(5.1+内置默认开启 处理大型XML文档)
- SDO(停止维护)
- SDO-DAS-Relational(试验性的)
- SDO DAS XML
- WDDX
- XMLDiff
- XML 解析器(Expat 解析器 默认开启)
- XSL(内置)
- 图形用户界面(GUI) 扩展
- UI
- PHP SPL(PHP 标准库)
- 数据结构
- SplDoublyLinkedList(双向链表)
- SplStack(栈 先进后出)
- SplQueue(队列)
- SplHeap(堆)
- SplMaxHeap(最大堆)
- SplMinHeap(最小堆)
- SplPriorityQueue(堆之优先队列)
- SplFixedArray(阵列【数组】)
- SplObjectStorage(映射【对象存储】)
- 迭代器
- ArrayIterator
- RecursiveArrayIterator(支持递归)
- DirectoryIterator类
- FilesystemIterator
- GlobIterator
- RecursiveDirectoryIterator
- EmptyIterator
- IteratorIterator
- AppendIterator
- CachingIterator
- RecursiveCachingIterator
- FilterIterator(遍历并过滤出不想要的值)
- CallbackFilterIterator
- RecursiveCallbackFilterIterator
- RecursiveFilterIterator
- ParentIterator
- RegexIterator
- RecursiveRegexIterator
- InfiniteIterator
- LimitIterator
- NoRewindIterator
- MultipleIterator
- RecursiveIteratorIterator
- RecursiveTreeIterator
- 文件处理
- SplFileInfo
- SplFileObject
- SplTempFileObject
- 接口 interface
- Countable
- OuterIterator
- RecursiveIterator
- SeekableIterator
- 异常
- 各种类及接口
- SplSubject
- SplObserver
- ArrayObject(将数组作为对象操作)
- SPL 函数
- 预定义接口
- Traversable(遍历)接口
- Iterator(迭代器)接口
- IteratorAggregate(聚合式迭代器)接口
- ArrayAccess(数组式访问)接口
- Serializable 序列化接口
- JsonSerializable
- Closure 匿名函数(闭包)类
- Generator生成器类
- 生成器(php5.5+)
- yield
- 反射
- 一、反射(reflection)类
- 二、Reflector 接口
- ReflectionClass 类报告了一个类的有关信息。
- ReflectionObject 类报告了一个对象(object)的相关信息。
- ReflectionFunctionAbstract
- ReflectionMethod 类报告了一个方法的有关信息
- ReflectionFunction 类报告了一个函数的有关信息。
- ReflectionParameter 获取函数或方法参数的相关信息
- ReflectionProperty 类报告了类的属性的相关信息。
- ReflectionClassConstant类报告有关类常量的信息。
- ReflectionZendExtension 类返回Zend扩展相关信息
- ReflectionExtension 报告了一个扩展(extension)的有关信息。
- 三、ReflectionGenerator类用于获取生成器的信息
- 四、ReflectionType 类用于获取函数、类方法的参数或者返回值的类型。
- 五、反射的应用场景
- phpRedis
- API
- API详细
- redis DB 概念:
- 通用命令:rawCommand
- Connection
- Server
- List
- Set
- Zset
- Hash
- string
- Keys
- 事物
- 发布订阅
- 流streams
- Geocoding 地理位置
- lua脚本
- Introspection 自我检测
- biMap
- 原生
- php-redis 操作类 封装
- redis 队列解决秒杀解决超卖:
- Linux+Nginx
- 前置
- linux
- 开源网站镜像及修改yum源
- 下载linux
- Liunx中安装PHP7.4 的三种方法(Centos8)
- yum安装
- 源码编译安装
- LNMP一键安装
- 宝塔安装(推荐)
- 查看linux版本号
- 设置全局环境变量
- 查看php.ini必须存放的位置
- 防火墙与端口开放
- nohup 后台运行命令
- linux 查看nginx,php-fpm运行用户及用户组
- 网络配置
- CentOS中执行yum update时报错
- 关闭防火墙
- 查看端口是否被占用
- 查看文件夹大小
- route命令
- nginx相关
- 一个典型的nginx配置
- nginx关于多个项目的配置(易于管理)
- nginx.config配置文件的结构
- 1、events
- 2、http
- server1
- location1
- location2
- server2
- location1
- location2
- nginx的location配置详解
- Nginx相关命令
- Nginx安装
- 正向,反向代理
- aaa
- phpstudy的nginx的配置
- 配置伪静态
- Nginx 重写规则
- 为静态配置例子
- apache
- nginx
- pathinfo模式
- Shell脚本
- bash
- shell 语言中 0 代表 true,0 以外的值代表 false。
- 变量
- shell字符串
- shell数组
- shell注释
- 向Shell脚内传递参数
- 运算符
- 显示命令执行结果
- printf
- test 命令
- 流程控制与循环
- if
- case
- for
- while
- until
- break和continue
- select 结构
- shell函数
- shell函数的全局变量和局部变量
- 将shell输出写入文件中(输出重定向)
- Shell脚本中调用另一个Shell脚本的三种方式
- 定时任务
- PHP实现定时任务的五种方法
- 宝塔
- 伪静态以及去掉tp的index.php
- 数据据远程访问
- openresty
- 优化
- ab压力测试
- PHP优化及注意事项
- 缓存
- opcache
- memcache
- php操作
- 数据库
- 配置
- 数据库锁机制
- 主从分布
- 数据库设计
- 逻辑设计
- 物理设计
- 字段类型的选择
- 笔记
- SET FOREIGN_KEY_CHECKS
- 字符集与乱码
- SQL插入 去除重复记录的实现
- 5.7+严格模式会导致设置notnull的字段没有值时报错
- 分区表
- nginx 主从配置
- nginx 负载均衡的配置
- 手动搭建Redis集群和MySQL主从同步(非Docker)
- Redis Cluster集群
- mysql主从同步
- 软件选择
- url重写
- 大流量高并发解决方案
- 【前端、移动端】
- html5
- meta标签
- flex布局
- 居中
- 显示、隐藏与禁用
- html5示例
- 瀑布流布局
- 移动端虚拟键盘会将position:fixed的元素顶到虚拟键盘的上面
- 使用div实现table效果
- javascript
- 移动端相关
- 缓存读取与写入
- 其他用法
- Javascript系统对象
- 原生javascript总结
- 节点操作
- 实用函数
- jquery
- jquery的extend插件制作
- 错误解决方案
- 选择器
- 查找与过滤
- parent,parents,parentsUntil,offsetParent
- children
- siblings
- find
- next,nextAll,nextUntil
- prev,prevAll,prevUntil
- closest
- 过滤
- ajax
- pajax入门
- 精细分类
- 事件
- on事件无效:
- jquery自定义事件
- 表单操作
- 通用
- select
- checkbox
- radio
- js正则相关
- js中判断某字符串含有某字符出现的次数
- js匹配指定字符
- $.getjson方法配合在url上传递callback=?参数,实现跨域
- jquery的兼容
- jquery的连续调用:
- $ 和 jQuery 及 $() 的区别
- 页面响应顺序及$(function(){})等使用
- 匿名函数:
- jquery的prop与attr的区别和与data()的联系
- 默认值问题
- 拼接当前页面的url
- dom加载
- ES6中如何导入和导出模块
- ES6函数写法
- 事件
- 手动触发事件
- 移动端常用事件之touch触摸事件
- 悬浮标签遮挡导致该位置的标签事件失效
- addEventListener
- new Function()
- 字符串操作
- 数组与对象操作
- Array
- 对象操作
- 数组对象复制断掉引用的方法!
- 数组的 交集 差集 补集 并集
- js数组与对象的【遍历与其他操作】
- js数组的map()方法操作json数组
- 获取js对象所有方法
- form
- js:select
- phantomjs
- js精确计算CalcEval 【价格计算】 浮点计算
- js精确计算2
- 模板替换
- input赋值
- JS的数据储存格式
- 可编辑区域与事件监听
- if为false的情况
- 阻止冒泡
- jq滚动到底部自动加载数据实例
- if(a,b,c){}
- 播放mp3
- bootstrap
- bootstrap3
- class速查
- 常见data属性
- data-toggle与data-target的作用
- botstrap4(自带轮播)
- 布局
- 页面内容
- botstrap4组件
- Collapse点击折叠
- bootstrapTable
- 表选项(html属性格式)
- 表选项2(js的json格式)
- 工具栏以及搜索框
- 本地化选项
- column列表选项
- 示例
- 行的详细视图
- 常用整理模板例子
- 数据格式(json)
- 用法(row:行,column:列)
- 页脚使用footerFormatter做统计列功能
- 示例2
- JQuery-Jquery的TreeGrid插件
- 服务器端分页
- 合并单元格1
- 合并单元格2
- 合并单元格3
- 合并单元格4
- 合并单元格5(插件)
- 列求和
- 添加行,修改行、扩展行数据
- bootstrap-table 怎么自定义搜索按钮实现点击按钮进行查询
- 添加序号
- bootstraptable的checkbox
- 动态添加列、动态添加行、单元格点击横向、竖向统计
- 记住分页checkbox
- 精简示例
- 扩展
- 组件
- 开源库cdn
- layer
- bootstrap-treeview与ztree
- Uploader上传组件
- jquery.form.js
- query.waypoints.min.js
- jquery.countup.js
- wow.min.js
- swiper.min.js
- 滑动select选择器
- wcPop.js
- waterfall
- overlayScrollbars 滚动条监听与美化
- Summernote 编辑器
- Tempusdominus 日期选择器
- daterangepicker 日期时间范围选择
- moment 日期处理js类库
- select2
- CitySelect
- vidbg基于jQuery全屏背景视频插件
- jquery.pjax.js 页面跳转时局部刷新
- 基于jquery的旋转图片验证码
- highcharts图表
- echarts图表
- 个版本变化
- 复制刀粘贴板
- photoswipe 相册组件
- fullPage.js 全屏滚动插件
- jQuery.loadScroll 滚动时动态加载图像
- jquery.nouislider 范围滑块
- Zepto:移动端的jquery库
- waterfall瀑布流插件
- mustache.js与Handlebars.js
- mobile select
- makdow编辑器
- toastr:轻量级的消息提示插件
- datatables
- 会员 数据库表设计
- 开发总结
- API接口
- API接口设计
- json转化
- app接口
- 企查查接口
- 杂项
- 开源项目
- PhpSpreadsheet
- 实例
- 导入导出
- 导出多个工作薄
- 将excel数据插入数据库
- 加载大文件
- phpoffice/phpspreadsheet
- PHPExcel
- 二维码phpqrcode
- feixuekeji/PHPAnalysis 分词
- http-crontab定时任务
- guzzle(HTTP客户端)
- easywechat(overtrue/wechat)
- 三方插件库
- 检测移动设备(包括平板电脑)
- textalk\websocket
- 与谷歌浏览器交互
- 支付
- Crontab管理器
- PHP操作Excel
- 阿里云域名解析
- SSL证书
- sublime Emmet的快捷语法
- 免费翻译接口
- 接口封装
- 免费空间
- 架构师必须知道的26项PHP安全实践
- 大佬博客
- 个人支付平台
- RPC(远程调用)及框架
- PHP中的数组分页实现(非数据库)
- 用安卓手机搭建 web 服务器
- 优惠券
- 抽奖算法
- 三级分销
- 项目要求
- 权限设计
- ACL
- RBAC
- RBAC0
- RBAC1(角色上下级分层)
- RBAC2(用户角色限约束)
- RBAC3(分层+约束)
- 例子
- Rbac.class.php
- Rbac2
- Auth.class.php
- fastadmin Auth
- tree1
- 数据表
- TP6auth拓展
- ABAC 基于属性的访问控制
- 总结:SAAS后台权限设计案例分析
- casbin-权限管理框架
- 开始使用
- casbinAPI
- casbin管理API
- RBAC API
- Think-Casbin
- php修改session的保存方式
- 单点登录(SSO)
- 例子1
- 例子2
- OAuth授权(用于第三方授权)
- OAuth 2.0 的四种方式
- 授权码
- 隐藏式
- 密码式
- 凭证式
- 更新令牌
- 例子:第三方登录
- 微服务架构下的统一身份认证和授权
- 代码审计
- 漏洞挖掘的思路
- 命令注入
- 代码注入
- XSS 反射型漏洞
- XSS 存储型漏洞
- xss过滤
- HTML Purifier文档
- 开始
- id规则
- class规则
- 过滤分类
- Attr
- AutoFormat
- CSS
- Cache
- Core
- Filter
- html
- Output
- Test
- URI
- 其他
- 嵌入YouTube视频
- 加快HTML净化器的速度
- 字符集
- 定制
- Tidy
- URI过滤器
- 在线测试
- xss例子
- 本地包含与远程包含
- sql注入
- 函数
- 注释
- 步骤
- information_schema
- sql注入的分类
- 实战
- 防御
- CSRF 跨站请求伪造
- 计动态函数执行与匿名函数执行
- unserialize反序列化漏洞
- 覆盖变量漏洞
- 文件管理漏洞
- 文件上传漏洞
- 跳过登录
- URL编码对照表
- XXE
- 第三方
- 对象存储oss
- 阿里云
- 启用mysql的sql日志