```
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日志