<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>天涯家园HomeH</title><link>https://www.homeh.cc/</link><description>- 网络编程,php编编程,php代码,WEB精品软件资源分享学习家园</description><item><title>ImageMagick 图片剪切</title><link>https://www.homeh.cc/post/166.html</link><description>&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;/*&amp;nbsp;图片路径&amp;nbsp;*/
const&amp;nbsp;char&amp;nbsp;file_path[]&amp;nbsp;=&amp;nbsp;&amp;quot;D:/studyplace/workplace/cpp/resource/9.gif&amp;quot;;
const&amp;nbsp;char&amp;nbsp;result_path[]&amp;nbsp;=&amp;nbsp;&amp;quot;D:/studyplace/workplace/cpp/resource/tmp.gif&amp;quot;;
/*&amp;nbsp;普通图片剪切&amp;nbsp;*/
int&amp;nbsp;magick_crop()
{
&amp;nbsp;int&amp;nbsp;rc&amp;nbsp;=&amp;nbsp;0;
&amp;nbsp;MagickWand*&amp;nbsp;magick_wand&amp;nbsp;=&amp;nbsp;NULL;
&amp;nbsp;//&amp;nbsp;初始化ImageMagick库
&amp;nbsp;MagickWandGenesis();
&amp;nbsp;//&amp;nbsp;创建MagickWand对象
&amp;nbsp;magick_wand&amp;nbsp;=&amp;nbsp;NewMagickWand();
&amp;nbsp;//&amp;nbsp;读取图片文件
&amp;nbsp;if&amp;nbsp;(MagickReadImage(magick_wand,&amp;nbsp;file_path)&amp;nbsp;==&amp;nbsp;MagickFalse)&amp;nbsp;{
&amp;nbsp;printf(&amp;quot;Failed&amp;nbsp;to&amp;nbsp;read&amp;nbsp;image\n&amp;quot;);
&amp;nbsp;rc&amp;nbsp;=&amp;nbsp;-1;
&amp;nbsp;goto&amp;nbsp;l_out;
&amp;nbsp;}
&amp;nbsp;//&amp;nbsp;在&amp;nbsp;(50,&amp;nbsp;50)&amp;nbsp;处裁剪出&amp;nbsp;100x100&amp;nbsp;大小的区域
&amp;nbsp;if&amp;nbsp;(MagickCropImage(magick_wand,&amp;nbsp;100,&amp;nbsp;100,&amp;nbsp;50,&amp;nbsp;50)&amp;nbsp;==&amp;nbsp;MagickFalse)&amp;nbsp;{
&amp;nbsp;printf(&amp;quot;Failed&amp;nbsp;to&amp;nbsp;crop&amp;nbsp;image\n&amp;quot;);
&amp;nbsp;rc&amp;nbsp;=&amp;nbsp;-1;
&amp;nbsp;goto&amp;nbsp;l_e_free;
&amp;nbsp;}
&amp;nbsp;//&amp;nbsp;保存剪切后的图片


if&amp;nbsp;(MagickWriteImage(magick_wand,&amp;nbsp;result_path)&amp;nbsp;==&amp;nbsp;MagickFalse)&amp;nbsp;{
&amp;nbsp;printf(&amp;quot;Failed&amp;nbsp;to&amp;nbsp;write&amp;nbsp;image\n&amp;quot;);
&amp;nbsp;rc&amp;nbsp;=&amp;nbsp;-1;
&amp;nbsp;goto&amp;nbsp;l_e_free;
&amp;nbsp;}
&amp;nbsp;magick_wand&amp;nbsp;=&amp;nbsp;DestroyMagickWand(magick_wand);
l_out:
&amp;nbsp;MagickWandTerminus();
&amp;nbsp;return&amp;nbsp;rc;
l_e_free:
&amp;nbsp;magick_wand&amp;nbsp;=&amp;nbsp;DestroyMagickWand(magick_wand);
&amp;nbsp;goto&amp;nbsp;l_out;
}
int&amp;nbsp;main()&amp;nbsp;{
&amp;nbsp;magick_crop();
&amp;nbsp;return&amp;nbsp;0;
}&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 28 Nov 2024 02:18:29 +0800</pubDate></item><item><title>PHP图片压缩（TinyPNG在线API）和（使用Imagick扩展）</title><link>https://www.homeh.cc/post/165.html</link><description>&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp; PHP图片压缩（TinyPNG在线API）和（使用Imagick扩展）&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;1、调用TinyPng网站提供的API&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TinyPNG 使用智能有损压缩技术来减小 WEBP、JPEG 和 PNG 文件的文件大小。 通过有选择地减少图像中的颜色数量，存储数据所需的字节更少。 效果几乎不可见，但它在文件大小上有很大的不同！&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1)、官网地址：&lt;a href=&quot;https://tinypng.com/&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;https://tinypng.com/&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; github:&lt;a href=&quot;https://github.com/tinify/tinify-php&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;https://github.com/tinify/tinify-php&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2)、&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;API key申请地址：&lt;a href=&quot;https://tinypng.com/developers&quot; _src=&quot;https://tinypng.com/developers&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;https://tinypng.com/developers&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;调用这个网站提供的API需要申请一个API key，输入邮箱，它会把包含API key的网址发到你邮箱，打开其中的链接就可以看到属于你的API key了；&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3)、调用这个网站的API进行图片压缩的话，每个月前500张是免费的，之后要收费；&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4)、虽然域名是tinypng，但是操作 WEBP, JPEG and PNG files大小。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;composer安装&lt;/span&gt;：&lt;/p&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;syntaxhighlighter php&quot; width=&quot;750&quot;&gt;&lt;tbody style=&quot;box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;tr style=&quot;box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot; class=&quot;firstRow&quot;&gt;&lt;td class=&quot;gutter&quot; style=&quot;box-sizing: content-box !important; padding: 9.5px 0px 9.5px 9.5px !important; margin: 0px !important; border-radius: 4px 0px 0px 4px !important; background: none rgb(247, 247, 249) !important; border-top: 0px !important; border-bottom: 0px !important; border-left: 0px !important; border-right-color: rgb(225, 225, 232) !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; min-height: auto !important; color: rgb(175, 175, 175) !important; user-select: none !important;&quot; width=&quot;NaN&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: normal; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; text-align: right !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; white-space: pre !important;&quot;&gt;1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;box-sizing: content-box !important; padding: 0px !important; margin: 0px !important; border-radius: 0px !important; background: none !important; border-width: 0px !important; border-style: initial !important; border-color: initial !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; min-height: auto !important;&quot; width=&quot;712&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; box-sizing: content-box !important; padding: 0px !important; margin: 0px !important; width: auto !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: relative !important; vertical-align: baseline !important; min-height: auto !important;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;D:\wamp\www\tinypng&amp;gt;composer&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php keyword&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: rgb(255, 120, 0) !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; font-weight: bold !important; min-height: auto !important;&quot;&gt;require&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;tinify/tinify&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/11/20241128021655173273141554994.png&quot;&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;使用API之前，先用api秘钥进行身份验证。编辑文件index.php，添加内容：&lt;/p&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;syntaxhighlighter php&quot; width=&quot;750&quot;&gt;&lt;tbody style=&quot;box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;tr style=&quot;box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot; class=&quot;firstRow&quot;&gt;&lt;td class=&quot;gutter&quot; style=&quot;box-sizing: content-box !important; padding: 9.5px 0px 9.5px 9.5px !important; margin: 0px !important; border-radius: 4px 0px 0px 4px !important; background: none rgb(247, 247, 249) !important; border-top: 0px !important; border-bottom: 0px !important; border-left: 0px !important; border-right-color: rgb(225, 225, 232) !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; min-height: auto !important; color: rgb(175, 175, 175) !important; user-select: none !important;&quot; width=&quot;NaN&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: normal; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; text-align: right !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; white-space: pre !important;&quot;&gt;1&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: normal; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; text-align: right !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; white-space: pre !important;&quot;&gt;2&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: normal; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; text-align: right !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; white-space: pre !important;&quot;&gt;3&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: normal; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; text-align: right !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; white-space: pre !important;&quot;&gt;4&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: normal; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; text-align: right !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; white-space: pre !important;&quot;&gt;5&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;box-sizing: content-box !important; padding: 0px !important; margin: 0px !important; border-radius: 0px !important; background: none !important; border-width: 0px !important; border-style: initial !important; border-color: initial !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; min-height: auto !important;&quot; width=&quot;712&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; box-sizing: content-box !important; padding: 0px !important; margin: 0px !important; width: auto !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: relative !important; vertical-align: baseline !important; min-height: auto !important;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php keyword&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: rgb(255, 120, 0) !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; font-weight: bold !important; min-height: auto !important;&quot;&gt;require_once&lt;/code&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;php string&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: blue !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&amp;quot;vendor/autoload.php&amp;quot;&lt;/code&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&amp;nbsp;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;\Tinify\setKey(&lt;/code&gt;&lt;code class=&quot;php string&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: blue !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&amp;quot;*****QF8jqvp5GDjvRKrjXvfGd9*****&amp;quot;&lt;/code&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php variable&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: rgb(170, 119, 0) !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;$source&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;=&amp;nbsp;\Tinify\fromFile(&lt;/code&gt;&lt;code class=&quot;php string&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: blue !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&amp;quot;test.jpeg&amp;quot;&lt;/code&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; box-sizing: content-box !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php variable&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: rgb(170, 119, 0) !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;$source&lt;/code&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;-&amp;gt;toFile(&lt;/code&gt;&lt;code class=&quot;php string&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: blue !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&amp;quot;1.jpeg&amp;quot;&lt;/code&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/11/20241128021656173273141685733.png&quot;&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;可以看到test.jpeg，文件生成了1.jpeg文件。同事文件大小也小了很多。打开压缩图片，图片质量还是很高。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;网上TinyImg类库&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;（1） class TinyImg 是我自己写的一个类，包含下面三个方法：&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;《1》压缩文件夹下全部图片&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;public function compressImgsFolder($key,$inputFolder,$outputFolder)&lt;/span&gt;是用来压缩文件夹&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;$inputFolder&lt;/span&gt;&amp;nbsp;（目录路径）中的图片，保存到文件夹&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;$outputFolder&lt;/span&gt;&amp;nbsp;（目录路径）中，其中&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;$key&lt;/span&gt;&amp;nbsp;就是上边申请的API key；&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;《2》压缩单张图片&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;public function compressImg($key, $input, $output)&amp;nbsp;&lt;/span&gt;将输入的图片&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;$input&lt;/span&gt;&amp;nbsp;（图片路径）进行压缩并保存到图片&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;$output&amp;nbsp;&lt;/span&gt;（图片路径）；&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;这个函数中的代码是从官网调用示例中提取出来的，&lt;span style=&quot;box-sizing: border-box; color: #FF0000;&quot;&gt;初始的时候，line40是被注释掉的，直接使用会出错&lt;/span&gt;，我们需要&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;1&amp;gt; 去掉注释；&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;2&amp;gt; 到http://curl.haxx.se/ca/cacert.pem把这个网页(文本)保存（Ctrl+S）到&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;class TinyImg&amp;nbsp;&lt;/span&gt;类文件的同一目录下；&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;《3》获取文件夹下全部图片的名字&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;public function getFiles($filedir)&lt;/span&gt;&amp;nbsp;获取&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;$filedir&lt;/span&gt;下的全部图片的名字列表；&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
&amp;lt;?php
/**
&amp;nbsp;*&amp;nbsp;Created&amp;nbsp;by&amp;nbsp;PhpStorm.
&amp;nbsp;*&amp;nbsp;User:&amp;nbsp;Zhang&amp;nbsp;He
&amp;nbsp;*&amp;nbsp;Date:&amp;nbsp;2015/6/8
&amp;nbsp;*&amp;nbsp;Time:&amp;nbsp;10:14
&amp;nbsp;*/
&amp;nbsp;
class&amp;nbsp;TinyImg&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*Compress&amp;nbsp;all&amp;nbsp;images&amp;nbsp;in&amp;nbsp;folder&amp;nbsp;$inputFolder&amp;nbsp;and&amp;nbsp;save&amp;nbsp;final&amp;nbsp;images&amp;nbsp;in&amp;nbsp;folder&amp;nbsp;$outputFolder*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;compressImgsFolder($key,$inputFolder,$outputFolder){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$images&amp;nbsp;=&amp;nbsp;$this-&amp;gt;getFiles($inputFolder);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(empty($images)){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach($images&amp;nbsp;as&amp;nbsp;$image){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$input&amp;nbsp;=&amp;nbsp;$inputFolder.&amp;quot;\\&amp;quot;.$image;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$output&amp;nbsp;=&amp;nbsp;$outputFolder.&amp;quot;\\&amp;quot;.$image;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print($input.&amp;quot;&amp;lt;br&amp;gt;&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print($output.&amp;quot;&amp;lt;br&amp;gt;&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;gt;compressImg($key,$input,$output);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*Compress&amp;nbsp;one&amp;nbsp;image&amp;nbsp;$input&amp;nbsp;and&amp;nbsp;save&amp;nbsp;as&amp;nbsp;$output*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;compressImg($key,&amp;nbsp;$input,&amp;nbsp;$output){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$url&amp;nbsp;=&amp;nbsp;&amp;quot;https://api.tinify.com/shrink&amp;quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$options&amp;nbsp;=&amp;nbsp;array(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;http&amp;quot;&amp;nbsp;=&amp;gt;&amp;nbsp;array(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;method&amp;quot;&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;quot;POST&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;header&amp;quot;&amp;nbsp;=&amp;gt;&amp;nbsp;array(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;Content-type:&amp;nbsp;image/png&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;Authorization:&amp;nbsp;Basic&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;base64_encode(&amp;quot;api:$key&amp;quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;content&amp;quot;&amp;nbsp;=&amp;gt;&amp;nbsp;file_get_contents($input)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;ssl&amp;quot;&amp;nbsp;=&amp;gt;&amp;nbsp;array(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp;Uncomment&amp;nbsp;below&amp;nbsp;if&amp;nbsp;you&amp;nbsp;have&amp;nbsp;trouble&amp;nbsp;validating&amp;nbsp;our&amp;nbsp;SSL&amp;nbsp;certificate.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Download&amp;nbsp;cacert.pem&amp;nbsp;from:&amp;nbsp;http://curl.haxx.se/ca/cacert.pem&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;cafile&amp;quot;&amp;nbsp;=&amp;gt;&amp;nbsp;__DIR__&amp;nbsp;.&amp;nbsp;&amp;quot;/cacert.pem&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;verify_peer&amp;quot;&amp;nbsp;=&amp;gt;&amp;nbsp;true
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$result&amp;nbsp;=&amp;nbsp;fopen($url,&amp;nbsp;&amp;quot;r&amp;quot;,&amp;nbsp;false,&amp;nbsp;stream_context_create($options));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($result)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp;Compression&amp;nbsp;was&amp;nbsp;successful,&amp;nbsp;retrieve&amp;nbsp;output&amp;nbsp;from&amp;nbsp;Location&amp;nbsp;header.&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($http_response_header&amp;nbsp;as&amp;nbsp;$header)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(strtolower(substr($header,&amp;nbsp;0,&amp;nbsp;10))&amp;nbsp;===&amp;nbsp;&amp;quot;location:&amp;nbsp;&amp;quot;)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file_put_contents($output,&amp;nbsp;fopen(substr($header,&amp;nbsp;10),&amp;nbsp;&amp;quot;rb&amp;quot;,&amp;nbsp;false));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp;Something&amp;nbsp;went&amp;nbsp;wrong!&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;Compression&amp;nbsp;failed&amp;lt;br&amp;gt;&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//get&amp;nbsp;all&amp;nbsp;files&amp;#39;&amp;nbsp;fullname&amp;nbsp;in&amp;nbsp;$filedir
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;getFiles($filedir){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$files&amp;nbsp;=&amp;nbsp;[];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$dir&amp;nbsp;=&amp;nbsp;@dir($filedir);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(($file&amp;nbsp;=&amp;nbsp;$dir-&amp;gt;read())!=&amp;nbsp;false){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if($file&amp;nbsp;!=&amp;nbsp;&amp;quot;.&amp;quot;&amp;nbsp;and&amp;nbsp;$file&amp;nbsp;!=&amp;nbsp;&amp;quot;..&amp;quot;){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$files[]&amp;nbsp;=&amp;nbsp;$file;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$dir-&amp;gt;close();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$files;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; （2） 测试代码&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
&amp;lt;?php
include(&amp;quot;TinyImg.php&amp;quot;);
/**
&amp;nbsp;*&amp;nbsp;Created&amp;nbsp;by&amp;nbsp;PhpStorm.
&amp;nbsp;*&amp;nbsp;User:&amp;nbsp;Zhang&amp;nbsp;He
&amp;nbsp;*&amp;nbsp;Date:&amp;nbsp;2015/6/8
&amp;nbsp;*&amp;nbsp;Time:&amp;nbsp;11:45
&amp;nbsp;*/
$tinyImg&amp;nbsp;=&amp;nbsp;new&amp;nbsp;TinyImg();
$key&amp;nbsp;=&amp;nbsp;&amp;quot;****HDtB9xgcry4tdcgbqkhLHs0****&amp;quot;;//这里是你申请的API&amp;nbsp;key
$input&amp;nbsp;=&amp;nbsp;&amp;quot;D:\\wamp\\www\\zh\\testTinyPng\\ibg_large_test&amp;quot;;&amp;nbsp;//这个文件夹下的文件会被压缩
$output&amp;nbsp;=&amp;nbsp;&amp;quot;D:\\wamp\\www\\zh\\testTinyPng\\ibg_small_test&amp;quot;;//压缩的结果会被保存到这个文件夹中
$tinyImg-&amp;gt;compressImgsFolder($key,$input,$output);&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;2、使用PHP的Imagick扩展&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2.1、PHP图像处理扩展包GD、Imagick、Gmagick对比&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GD属于老古董级别的，丢掉吧，效率很低，而且压缩的图片体积很大。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Imagick是个不错的选择，在PHP的图片处理扩展中表现的很显眼。不管是对jpg或png的静态图片，还是对gif的动态图片，压缩和缩小放大尺寸都非常给力。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Gmagic没怎么试过，而GraphicsMagick据说也是相当的给力，但网上很多评论基本上都是对效率的一些评测。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;用Imagick替代php的GD库, 安装流程：&lt;a href=&quot;https://cksite.cn/article/165&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;https://cksite.cn/article/165&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;测试用例：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
&amp;lt;?php
//读取pdf页面的第一页
$im&amp;nbsp;=&amp;nbsp;new&amp;nbsp;Imagick(&amp;#39;more.pdf&amp;#39;);
//设置输出图片的格式
$im-&amp;gt;setImageFormat(&amp;#39;png&amp;#39;);
//输出图片
header(&amp;#39;Content-Type:image/png&amp;#39;);
echo&amp;nbsp;$im;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp; &amp;nbsp;2.2、优化前代码&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;这个代码中的压缩功能，主要依靠&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;line18的 $imagick-&amp;gt;cropThumbnailImage($width, $height);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;和line20的 $imagick-&amp;gt;resizeImage($width, $height, Imagick::FILTER_LANCZOS, 1, true);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;实现的压缩。&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
/**
&amp;nbsp;*&amp;nbsp;缩小图片尺寸.
&amp;nbsp;*
&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$image&amp;nbsp;待处理的二进制图片
&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$width&amp;nbsp;处理后图片尺寸的宽度(px)
&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$height&amp;nbsp;处理后图片尺寸的高度(px)
&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$crop&amp;nbsp;是否裁剪图片
&amp;nbsp;*
&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;处理好的二进制图片
&amp;nbsp;*/
function&amp;nbsp;resize($image,&amp;nbsp;$width,&amp;nbsp;$height,&amp;nbsp;$crop)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick&amp;nbsp;=&amp;nbsp;new&amp;nbsp;\Imagick();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;readImageBlob($image);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$w&amp;nbsp;=&amp;nbsp;$imagick-&amp;gt;getImageWidth();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$h&amp;nbsp;=&amp;nbsp;$imagick-&amp;gt;getImageHeight();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($w&amp;nbsp;&amp;gt;&amp;nbsp;$width&amp;nbsp;||&amp;nbsp;$h&amp;nbsp;&amp;gt;&amp;nbsp;$height)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($crop)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;cropThumbnailImage($width,&amp;nbsp;$height);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;resizeImage($width,&amp;nbsp;$height,&amp;nbsp;\Imagick::FILTER_LANCZOS,&amp;nbsp;1,&amp;nbsp;true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$processed_image&amp;nbsp;=&amp;nbsp;$imagick-&amp;gt;getImageBlob();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$processed_image;
}&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&amp;nbsp; &amp;nbsp; 2.3 优化后代码&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
/*
*&amp;nbsp;User:Zhang&amp;nbsp;He
*&amp;nbsp;Time:20150610
*&amp;nbsp;Function:Resize&amp;nbsp;$src&amp;nbsp;image&amp;nbsp;and&amp;nbsp;store&amp;nbsp;as&amp;nbsp;$dst
*&amp;nbsp;*/
function&amp;nbsp;resize($src,&amp;nbsp;$dst,&amp;nbsp;$width=320,&amp;nbsp;$height=320,&amp;nbsp;$crop=false)&amp;nbsp;{
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick&amp;nbsp;=&amp;nbsp;new&amp;nbsp;\Imagick($src);
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$w&amp;nbsp;=&amp;nbsp;$imagick-&amp;gt;getImageWidth();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$h&amp;nbsp;=&amp;nbsp;$imagick-&amp;gt;getImageHeight();
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($w&amp;nbsp;&amp;gt;&amp;nbsp;$width&amp;nbsp;||&amp;nbsp;$h&amp;nbsp;&amp;gt;&amp;nbsp;$height)&amp;nbsp;{
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($crop)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;cropThumbnailImage($width,&amp;nbsp;$height);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;resizeImage($width,&amp;nbsp;$height,&amp;nbsp;\Imagick::FILTER_CATROM,&amp;nbsp;1,&amp;nbsp;true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;setImageFormat(&amp;#39;JPEG&amp;#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;setImageCompression(\Imagick::COMPRESSION_JPEG);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$a&amp;nbsp;=&amp;nbsp;$imagick-&amp;gt;getImageCompressionQuality()&amp;nbsp;*&amp;nbsp;0.75;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($a&amp;nbsp;==&amp;nbsp;0)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$a&amp;nbsp;=&amp;nbsp;75;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;setImageCompressionQuality($a);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;stripImage();
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;writeImage($dst);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;clear();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$imagick-&amp;gt;destroy();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//调用&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
$src&amp;nbsp;=&amp;nbsp;&amp;quot;xxxxx/imagick/test.jpeg&amp;quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//xxxxx&amp;nbsp;为物理路径
$dst&amp;nbsp;=&amp;nbsp;&amp;quot;xxxxx/imagick/1.jpeg&amp;quot;;
resize($src,&amp;nbsp;$dst);&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;（1）参考文章&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;优化代码集中在line22-line31，至于为什么这样优化以及优化达到的效果，可以看原文链接（代码没有格式化）：&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.6a8a.com/2011/PHP_0402/939.html&quot; _src=&quot;http://www.6a8a.com/2011/PHP_0402/939.html&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;http://www.6a8a.com/2011/PHP_0402/939.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;（2）函数的作用&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;每个函数的含义可以到&amp;nbsp;&lt;a href=&quot;http://php.net/manual/zh/class.imagick.php&quot; _src=&quot;http://php.net/manual/zh/class.imagick.php&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;http://php.net/manual/zh/class.imagick.php&lt;/a&gt;&amp;nbsp; &amp;nbsp;查看，下面我列出最主要的几个函数及其解释。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://php.net/manual/zh/imagick.setimageformat.php&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;bool Imagick::setImageFormat ( string $format )&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;为图片设置指定格式 支持的格式以及对应的库，可以查看&amp;nbsp;&lt;a href=&quot;http://www.imagemagick.org/script/formats.php&quot; _src=&quot;http://www.imagemagick.org/script/formats.php&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;http://www.imagemagick.org/script/formats.php&lt;/a&gt;&amp;nbsp; &amp;nbsp;。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://www.php.net/manual/zh/imagick.setimagecompression.php&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;bool Imagick::setImageCompression ( int $compression )&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;设置图片压缩的类型 Imagick中定义的常量，可以查看&amp;nbsp;&lt;a href=&quot;http://php.net/manual/en/imagick.constants.php&quot; _src=&quot;http://php.net/manual/en/imagick.constants.php&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;http://php.net/manual/en/imagick.constants.php&lt;/a&gt;&amp;nbsp; &amp;nbsp;。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://www.php.net/manual/zh/imagick.setimagecompressionquality.php&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;bool Imagick::setImageCompressionQuality ( int $quality )&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;设置图片压缩质量&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://www.php.net/manual/zh/imagick.stripimage.php&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;bool Imagick::stripImage ( void )&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;去掉图片的所有配置和设置，如&lt;a href=&quot;https://baike.baidu.com/item/Exif&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;Exif&lt;/a&gt;。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://php.net/manual/zh/imagick.resizeimage.php&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;bool Imagick::resizeImage ( int $columns , int $rows , int $filter , float $blur [, bool $bestfit = false ] )&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;通过过滤器将图片缩放到期望的尺寸。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;过滤器也在Imagick定义的常量页面可以找到：&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://php.net/manual/zh/imagick.constants.php#imagick.constants.filters&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;http://php.net/manual/zh/imagick.constants.php#imagick.constants.filters&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Note: 参数 bestfit 的特性在 Imagick 3.0.0 中已改变。在此版本以前，当目标尺寸设为 400x400 时，原尺寸为 200x150 的图像将不会被改变。自 Imagick 3.0.0 起，源图像将会被放大到 400x300 因为这将更好的适合目标尺寸。当使用参数 bestfit 时，必须同时给出宽度和高度。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://php.net/manual/zh/imagick.cropthumbnailimage.php&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;bool Imagick::cropThumbnailImage ( int $width , int $height )&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;生成一个指定大小的缩略图，首先放大或缩小图片，然后裁剪出一个指定的区域从图片中间。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;示例代码：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
&amp;lt;?php
/*&amp;nbsp;Read&amp;nbsp;the&amp;nbsp;image&amp;nbsp;*/
$im&amp;nbsp;=&amp;nbsp;new&amp;nbsp;imagick(&amp;nbsp;&amp;quot;test.png&amp;quot;&amp;nbsp;);
/*&amp;nbsp;create&amp;nbsp;the&amp;nbsp;thumbnail&amp;nbsp;*/
$im-&amp;gt;cropThumbnailImage(&amp;nbsp;80,&amp;nbsp;80&amp;nbsp;);
/*&amp;nbsp;Write&amp;nbsp;to&amp;nbsp;a&amp;nbsp;file&amp;nbsp;*/
$im-&amp;gt;writeImage(&amp;nbsp;&amp;quot;th_80x80_test.png&amp;quot;&amp;nbsp;);
?&amp;gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;（3）选择哪个过滤器？&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;将一个5906*5906的图片压缩至1181*1181所需时间对比：&lt;/p&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_POINT&amp;nbsp;took:&amp;nbsp;0.334532976151&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_BOX&amp;nbsp;took:&amp;nbsp;0.777871131897&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_TRIANGLE&amp;nbsp;took:&amp;nbsp;1.3695909977&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_HERMITE&amp;nbsp;took:&amp;nbsp;1.35866093636&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_HANNING&amp;nbsp;took:&amp;nbsp;4.88722896576&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_HAMMING&amp;nbsp;took:&amp;nbsp;4.88665103912&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_BLACKMAN&amp;nbsp;took:&amp;nbsp;4.89026689529&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_GAUSSIAN&amp;nbsp;took:&amp;nbsp;1.93553304672&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_QUADRATIC&amp;nbsp;took:&amp;nbsp;1.93322920799&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_CUBIC&amp;nbsp;took:&amp;nbsp;2.58396601677&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_CATROM&amp;nbsp;took:&amp;nbsp;2.58508896828&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_MITCHELL&amp;nbsp;took:&amp;nbsp;2.58368492126&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number13 index12 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_LANCZOS&amp;nbsp;took:&amp;nbsp;3.74232912064&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number14 index13 alt1&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_BESSEL&amp;nbsp;took:&amp;nbsp;4.03305602074&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number15 index14 alt2&quot; style=&quot;word-break: break-all; overflow-wrap: break-word; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; background-color: rgb(245, 245, 245); font-size: 13px; color: rgb(51, 51, 51); white-space: normal; box-sizing: content-box !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;&lt;code class=&quot;php plain&quot; style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; box-sizing: content-box !important; padding: 0px !important; color: black !important; background: none !important; border-radius: 0px !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important;&quot;&gt;FILTER_SINC&amp;nbsp;took:&amp;nbsp;4.90098690987&amp;nbsp;seconds&lt;/code&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 因此，&lt;span style=&quot;box-sizing: border-box; color: #FF0000;&quot;&gt;CATROM&lt;/span&gt;在保证压缩效果接近&lt;span style=&quot;box-sizing: border-box; color: #FF0000;&quot;&gt;LANCZOS&lt;/span&gt;的同时，耗时也比较短。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;（4）最简洁代码示例&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;我找到最简洁的例子是这个：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;/*
Imagick::setImageCompression
Imagick::setImageCompressionQuality
Imagick::stripImage
Imagick::thumbnailImage
Imagick::writeImage
*/
&amp;nbsp;
&amp;lt;?php
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$image&amp;nbsp;=&amp;nbsp;&amp;#39;image.jpg&amp;#39;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$directory&amp;nbsp;=&amp;nbsp;&amp;#39;/path/to/image&amp;#39;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$image_location&amp;nbsp;=&amp;nbsp;$directory&amp;nbsp;.&amp;nbsp;&amp;quot;/&amp;quot;&amp;nbsp;.&amp;nbsp;$image;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumb_destination&amp;nbsp;=&amp;nbsp;$directory&amp;nbsp;.&amp;nbsp;&amp;quot;/t&amp;quot;&amp;nbsp;.&amp;nbsp;$image;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$compression_type&amp;nbsp;=&amp;nbsp;Imagick::COMPRESSION_JPEG;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$im&amp;nbsp;=&amp;nbsp;new&amp;nbsp;Imagick($image_location);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumbnail&amp;nbsp;=&amp;nbsp;$im-&amp;gt;clone;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumbnail-&amp;gt;setImageCompression($compression_type);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumbnail-&amp;gt;setImageCompressionQuality(40);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumbnail-&amp;gt;stripImage();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumbnail-&amp;gt;thumbnailImage(100,null);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumbnail-&amp;gt;writeImage($thumb_destination);
?&amp;gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;php_imagick实现图片剪切、旋转、锐化、减色或增加特效的方法&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://www.jb51.net/article/58489.htm&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;https://www.jb51.net/article/58489.htm&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;p class=&quot;b-h-20&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; padding: 0px; width: 750px; height: 20px; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #EE542A;&quot;&gt;来自&lt;/span&gt;&lt;a href=&quot;http://www.cksite.cn/&quot; target=&quot;__blank&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(51, 122, 183); text-decoration-line: none; transition: all 0.5s ease 0s;&quot;&gt;冷暖自知一抹茶ck&lt;/a&gt;&lt;span style=&quot;color: #EE542A;&quot;&gt;http://www.cksite.cn&lt;/span&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 28 Nov 2024 02:11:23 +0800</pubDate></item><item><title>php 编程中图片怎么剪</title><link>https://www.homeh.cc/post/164.html</link><description>&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://cdn.homeh.cc/upload/2024/11/202411281732724699987518.png&quot; title=&quot;51c4171e501012534dea94c93f92e2d8.png&quot; alt=&quot;51c4171e501012534dea94c93f92e2d8.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;根据标题生成答案：如何使用PHP剪切图片&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;一、介绍&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;在Web开发中，经常会遇到需要剪切图片的情况，而PHP作为一种流行的服务器端脚本语言，提供了丰富的图像处理函数和类库，可以方便地实现对图片的剪切操作。本文将介绍如何使用PHP剪切图片。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;二、准备工作&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;在开始之前，我们需要确保服务器上已经安装了PHP，并且开启了相关的图像处理扩展（如GD库）。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;三、图像剪切函数&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;PHP提供了一些图像剪切相关的函数，主要包括：&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;1. imagecreatefromXXX：从不同格式的图像文件创建一个新的图像资源；&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;2. imagecrop：剪切图像的一部分，并返回剪切后的新图像资源。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;四、基本步骤&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;下面是使用PHP剪切图片的基本步骤：&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;1. 读取源图片：使用imagecreatefromXXX函数读取待剪切的图片，并通过变量保存图像资源。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;2. 创建目标图像：根据需要剪切的区域大小，使用imagecreatetruecolor函数创建一个新的图像资源，作为剪切后的图像。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;3. 剪切图片：使用imagecrop函数剪切待剪切的图片，并将剪切后的图像保存到目标图像资源中。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;4. 输出图像：使用相应的输出函数（如imagejpeg、imagepng）将剪切后的图像输出到浏览器或保存到文件中。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;五、示例代码&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;下面是一个简单的示例代码，演示了如何使用PHP剪切图片：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
//“`php
//&amp;nbsp;读取源图片
$sourceImage&amp;nbsp;=&amp;nbsp;imagecreatefromjpeg(‘source.jpg’);
//&amp;nbsp;创建目标图像
$targetWidth&amp;nbsp;=&amp;nbsp;200;
$targetHeight&amp;nbsp;=&amp;nbsp;200;
$targetImage&amp;nbsp;=&amp;nbsp;imagecreatetruecolor($targetWidth,&amp;nbsp;$targetHeight);
//&amp;nbsp;剪切图片
$cropX&amp;nbsp;=&amp;nbsp;50;
$cropY&amp;nbsp;=&amp;nbsp;50;
$cropWidth&amp;nbsp;=&amp;nbsp;100;
$cropHeight&amp;nbsp;=&amp;nbsp;100;
imagecopy($targetImage,&amp;nbsp;$sourceImage,&amp;nbsp;0,&amp;nbsp;0,&amp;nbsp;$cropX,&amp;nbsp;$cropY,&amp;nbsp;$cropWidth,&amp;nbsp;$cropHeight);
//&amp;nbsp;输出图像
header(‘Content-Type:&amp;nbsp;image/jpeg’);
imagejpeg($targetImage);
//&amp;nbsp;释放资源
imagedestroy($sourceImage);
imagedestroy($targetImage);
//“`&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;如何使用PHP剪裁图片&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;剪裁图片是Web开发中常见的需求之一。在PHP中，可以使用GD库或ImageMagick库来实现图片的剪裁操作。下面将介绍如何在PHP中使用这两个库来剪裁图片。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;1. 使用GD库剪裁图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;GD库是一个流行的图像处理库，可以帮助我们在PHP中处理图像。要使用GD库，首先需要确保PHP已启用GD扩展。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;剪裁图片的基本步骤如下：&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;– 使用`imagecreatefromjpeg()`、`imagecreatefrompng()`或`imagecreatefromgif()`函数创建一个图像资源。&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;– 使用`imagecreatetruecolor()`函数创建一个新的画布，指定剪裁后的图片尺寸。&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;– 使用`imagecopyresampled()`函数将原始图像的一部分复制到新的画布上，并进行缩放。&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;– 使用`imagejpeg()`、`imagepng()`或`imagegif()`函数保存剪裁后的图片。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;下面是一个使用GD库剪裁图片的示例代码：&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;“`php&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;// 加载原始图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$sourceImage = imagecreatefromjpeg(‘original.jpg’);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;// 创建新的画布&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$targetWidth = 200;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$targetHeight = 200;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$targetImage = imagecreatetruecolor($targetWidth, $targetHeight);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;// 剪裁并缩放图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$sourceWidth = imagesx($sourceImage);&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$sourceHeight = imagesy($sourceImage);&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;imagecopyresampled($targetImage, $sourceImage, 0, 0, 0, 0, $targetWidth, $targetHeight, $sourceWidth, $sourceHeight);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;// 保存剪裁后的图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;imagejpeg($targetImage, ‘cropped.jpg’);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;// 释放资源&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;imagedestroy($sourceImage);&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;imagedestroy($targetImage);&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;“`&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;2. 使用ImageMagick库剪裁图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;除了GD库，PHP还可以使用ImageMagick库来处理图片。ImageMagick是一个功能强大的图像处理工具集，支持多种图像格式。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;使用ImageMagick库剪裁图片的步骤如下：&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;– 使用`new Imagick()`创建一个图像对象。&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;– 使用`cropImage()`方法指定剪裁的位置和尺寸。&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;– 使用`writeImage()`方法保存剪裁后的图片。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;下面是一个使用ImageMagick库剪裁图片的示例代码：&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;“`php&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;// 加载原始图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$image = new Imagick(‘original.jpg’);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;// 剪裁图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$targetWidth = 200;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$targetHeight = 200;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$image-&amp;gt;cropImage($targetWidth, $targetHeight, 0, 0);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;// 保存剪裁后的图片&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$image-&amp;gt;writeImage(‘cropped.jpg’);&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;// 释放资源&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;$image-&amp;gt;destroy();&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;“`&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;需要注意的是，在使用ImageMagick库之前，需要确保服务器已安装了ImageMagick及其扩展库。可以通过在终端中运行`convert -version`命令检查是否已安装。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; line-height: inherit; overflow-wrap: break-word; white-space: pre-wrap; color: rgb(38, 38, 38); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);&quot;&gt;通过上述示例代码，您可以轻松地在PHP中使用GD库或ImageMagick库进行图片的剪裁操作。根据自己的需求调整剪裁尺寸和位置，以获得所需的剪裁效果。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 28 Nov 2024 00:23:48 +0800</pubDate></item><item><title>PHP函数介绍—parse_url(): 解析URL字符串</title><link>https://www.homeh.cc/post/163.html</link><description>&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://cdn.homeh.cc/upload/2024/11/202411281732724550594795.png&quot; title=&quot;51c4171e501012534dea94c93f92e2d8.png&quot; alt=&quot;51c4171e501012534dea94c93f92e2d8.png&quot;/&gt;php函数介绍—parse_url(): 解析url字符串&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;在进行网页开发时，我们经常需要解析URL字符串，从中获取主机名、端口号、路径等信息。在PHP中，我们可以使用parse_url()函数来完成这个任务。&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;parse_url()函数接受一个URL字符串作为参数，并将其分解为一个关联数组，包含了URL的不同部分。下面是parse_url()函数的语法：&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;parse_url(string $url, int $component = -1): mixed&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;参数解释：&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px;&quot;&gt;立即学习&lt;/span&gt;“&lt;a href=&quot;https://pan.quark.cn/s/7fc7563c4182&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot; style=&quot;margin: 0px; padding: 0px; color: blue; outline: none; cursor: pointer; font-weight: bolder;&quot;&gt;PHP免费学习笔记（深入）&lt;/a&gt;”；&lt;/p&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;$url：待解析的URL字符串。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;$component：可选参数，指定要返回的URL组件，取值范围为PHP_URL_SCHEME、PHP_URL_HOST、PHP_URL_PORT、PHP_URL_USER、PHP_URL_PASS、PHP_URL_PATH、PHP_URL_QUERY、PHP_URL_FRAGMENT。默认值为-1，表示返回全部组件。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;下面是一个代码示例，演示如何使用parse_url()函数解析URL：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
$url&amp;nbsp;=&amp;nbsp;&amp;quot;https://www.example.com:8080/path/to/file.php?var1=value1&amp;amp;amp;var2=value2#section&amp;quot;;

//&amp;nbsp;解析URL
$parsedUrl&amp;nbsp;=&amp;nbsp;parse_url($url);

//&amp;nbsp;输出每个URL组件
echo&amp;nbsp;&amp;quot;Scheme:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;scheme&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;
echo&amp;nbsp;&amp;quot;Host:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;host&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;
echo&amp;nbsp;&amp;quot;Port:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;port&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;
echo&amp;nbsp;&amp;quot;User:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;user&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;
echo&amp;nbsp;&amp;quot;Password:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;pass&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;
echo&amp;nbsp;&amp;quot;Path:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;path&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;
echo&amp;nbsp;&amp;quot;Query:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;query&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;
echo&amp;nbsp;&amp;quot;Fragment:&amp;nbsp;&amp;quot;&amp;nbsp;.&amp;nbsp;$parsedUrl[&amp;#39;fragment&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;
&amp;quot;;&lt;/pre&gt;&lt;div class=&quot;code&quot; style=&quot;margin: 0px; padding: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); user-select: none; color: rgb(61, 70, 77); font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; font-size: 16px; white-space: normal; position: relative;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;syntaxhighlighter php&quot; width=&quot;954&quot;&gt;&lt;tbody style=&quot;margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: auto !important;&quot;&gt;&lt;tr style=&quot;margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: auto !important;&quot; class=&quot;firstRow&quot;&gt;&lt;td class=&quot;gutter&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px !important; padding: 9.5px 0px 9.5px 9.5px !important; border-radius: 4px 0px 0px 4px !important; background: none !important; border-top: 0px !important; border-bottom: 0px !important; border-left: 0px !important; border-right-color: rgb(225, 225, 232) !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; box-sizing: content-box !important; min-height: auto !important; color: rgb(175, 175, 175) !important; user-select: none !important;&quot; width=&quot;NaN&quot;&gt;&lt;p class=&quot;line number1 index0 alt2&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.5em; border-radius: 8px; font-size: 16px; color: rgb(61, 70, 77); box-sizing: border-box; overflow-wrap: break-word; padding-right: 0.5em !important; padding-left: 1em !important; border-left: 3px solid rgb(67, 90, 95) !important; white-space: pre-wrap !important; text-align: right !important;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0); user-select: none; word-break: break-all; margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border-width: 0px !important; border-style: initial !important; border-color: initial !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; box-sizing: content-box !important; min-height: auto !important;&quot; width=&quot;905&quot;&gt;&lt;p class=&quot;line number1 index0 alt2&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.5em; border-radius: 8px; font-size: 16px; box-sizing: border-box; overflow-wrap: break-word; padding-right: 1em !important; padding-left: 1em !important; border-left: 3px solid rgb(67, 90, 95) !important; white-space: pre-wrap !important;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;运行以上代码，将会输出以下结果：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;
Scheme:&amp;nbsp;https
Host:&amp;nbsp;www.example.com
Port:&amp;nbsp;8080
User:&amp;nbsp;
Password:&amp;nbsp;
Path:&amp;nbsp;/path/to/file.php
Query:&amp;nbsp;var1=value1&amp;amp;amp;var2=value2
Fragment:&amp;nbsp;section&lt;/pre&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;div class=&quot;code&quot; style=&quot;margin: 0px; padding: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); user-select: none; color: rgb(61, 70, 77); font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; font-size: 16px; white-space: normal; position: relative;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;syntaxhighlighter php&quot; width=&quot;954&quot;&gt;&lt;tbody style=&quot;margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: auto !important;&quot;&gt;&lt;tr style=&quot;margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: auto !important;&quot; class=&quot;firstRow&quot;&gt;&lt;td class=&quot;gutter&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px !important; padding: 9.5px 0px 9.5px 9.5px !important; border-radius: 4px 0px 0px 4px !important; background: none !important; border-top: 0px !important; border-bottom: 0px !important; border-left: 0px !important; border-right-color: rgb(225, 225, 232) !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; box-sizing: content-box !important; min-height: auto !important; color: rgb(175, 175, 175) !important; user-select: none !important;&quot; width=&quot;NaN&quot;&gt;&lt;p class=&quot;line number1 index0 alt2&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.5em; border-radius: 8px; font-size: 16px; color: rgb(61, 70, 77); box-sizing: border-box; overflow-wrap: break-word; padding-right: 0.5em !important; padding-left: 1em !important; border-left: 3px solid rgb(67, 90, 95) !important; white-space: pre-wrap !important; text-align: right !important;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0); user-select: none; word-break: break-all; margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border-width: 0px !important; border-style: initial !important; border-color: initial !important; inset: auto !important; float: none !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; box-sizing: content-box !important; min-height: auto !important;&quot; width=&quot;913&quot;&gt;&lt;p class=&quot;line number1 index0 alt2&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.5em; border-radius: 8px; font-size: 16px; box-sizing: border-box; overflow-wrap: break-word; padding-right: 1em !important; padding-left: 1em !important; border-left: 3px solid rgb(67, 90, 95) !important; white-space: pre-wrap !important;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;从输出结果可以看出，parse_url()函数成功地将URL字符串解析为了一个关联数组，我们可以方便地获取URL中的各个组件。&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;需要注意的是，如果URL字符串中没有某个组件，比如没有指定端口号、用户名等，对应的数组元素将会是空字符串。所以在使用解析后的URL组件时，一定要进行相关的判断和处理。&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;parse_url()函数是PHP中非常实用的函数之一，在处理URL相关的任务时非常方便。掌握了parse_url()函数的用法，我们可以更加灵活地处理URL字符串，提高网页开发的效率。&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;总结:&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;本文介绍了PHP中的parse_url()函数，它用于解析URL字符串。通过提供URL字符串作为参数，我们可以获得URL的不同部分，如主机名、端口号和路径等。parse_url()函数返回一个关联数组，我们可以通过键名访问具体的URL组件。在处理URL相关任务时，parse_url()函数是非常实用的一个工具，可以帮助我们更高效地开发网页。&lt;/p&gt;&lt;p style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; box-sizing: border-box; border-radius: 8px; overflow-wrap: break-word; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, &amp;quot;PingFang SC&amp;quot;, 微软雅黑, Tahoma, Arial, sans-serif; white-space: normal;&quot;&gt;以上就是PHP函数介绍—parse_url(): 解析URL字符串的详细内容，更多请关注php中文网其它相关文章！&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 28 Nov 2024 00:08:35 +0800</pubDate></item><item><title>网站百度秒收录的方法免费放送</title><link>https://www.homeh.cc/post/162.html</link><description>&lt;p&gt;&lt;span style=&quot;margin: 0px; padding: 0px; color: #666666; font-family: 微软雅黑, Verdana, Geneva, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;福利来了 市面上百度秒收录的方法免费放送 给各位助助兴&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;市面上说的备案域名当天秒收录 未备案隔天收录的技术 如下图所示 随便搜一个词&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;然后审查元素到这个结果的标题 然后把a标签链接改成自己要收录的首页或者内页 然后点击提交反馈 然后去百度反馈的页面看看有没有反馈结果 有的话就成功了 坐等收录&amp;nbsp; 一个号可以提交五次 换号要换IP&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;具体操作看图&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;说的这么清楚了不会的拖出去斩了！&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826053641172462180189862.png&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826053641172462180172157.png&quot;&gt;&lt;/span&gt;&lt;br style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); font-family: 微软雅黑, Verdana, Geneva, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); font-family: 微软雅黑, Verdana, Geneva, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); font-family: 微软雅黑, Verdana, Geneva, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;br style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); font-family: 微软雅黑, Verdana, Geneva, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;/p&gt;&lt;div style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); font-family: 微软雅黑, Verdana, Geneva, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); text-align: center;&quot;&gt;&lt;strong style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; font-size: 20px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; color: #000000;&quot;&gt;觉得本文不错，觉得可以多更新此类文章，可以打赏鼓励一下！&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; font-size: 20px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; color: #000000;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 26 Aug 2024 05:35:49 +0800</pubDate></item><item><title>PHP 基准测试：版本 8.1、8.2 和 8.3 的实际速度测试</title><link>https://www.homeh.cc/post/161.html</link><description>&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 是最常用的服务器端编程语言之一，为约 76% 的活跃网站提供动力。每年，我们都会发布针对各种 PHP 框架的深度性能基准，以了解不同 PHP 版本之间的对比情况。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;2023 年 12 月，我们在 11 个内容管理系统 (CMS) 和框架中对 PHP 8.1、8.2 和 8.3 进行了基准测试：WordPress、WooCommerce、Drupal（版本 7 和 10）、Joomla、Laravel、Symfony、CodeIgniter、Craft CMS、Typo3、Opencart 和 Statamic。我们还在 PHP 7.4 上对 WordPress 和 WooCommerce 进行了基准测试，因为许多网站仍在该版本上运行。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;作为最佳实践，我们建议始终使用最新的 PHP 版本，以优化性能和安全性。&lt;/p&gt;&lt;div class=&quot;wp-block-rank-math-toc-block china-hide&quot; id=&quot;rank-math-toc&quot; style=&quot;box-sizing: inherit; background: linear-gradient(45deg, rgb(114, 75, 183) 0%, rgb(64, 152, 215) 100%) 0% 0% / cover rgb(255, 255, 255); color: rgb(255, 255, 255); padding: 2rem; margin: 0px 0px 1.5rem; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 0px 0px 1rem; padding: 0px 0px 0.825rem; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(240, 244, 248); border-left-color: initial; border-image: initial; font-family: inherit; font-size: 28px; font-style: inherit; line-height: 35px;&quot;&gt;文章目录&lt;/h2&gt;&lt;nav style=&quot;box-sizing: inherit;&quot;&gt;&lt;ul style=&quot;box-sizing: border-box; padding: 0px 0px 0px 1em; border: 0px; list-style-position: initial; list-style-image: initial;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#%E6%88%91%E4%BB%AC%E7%9A%84-php-%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;我们的 PHP 基准测试&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#%E5%86%85%E5%AE%B9%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F%E5%92%8C%E6%A1%86%E6%9E%B6&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;内容管理系统和框架&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: square;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#word-press&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;WordPress&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#woo-commerce&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;WooCommerce&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#laravel&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;Laravel&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#drupal&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;Drupal&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#joomla&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;Joomla&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#symfony&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;Symfony&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#code-igniter&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;CodeIgniter&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#craft-cms&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;Craft CMS&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#open-cart&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;OpenCart&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#statamic&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;Statamic&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#typo-3&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;Typo3&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#php-%E7%9A%84%E6%95%85%E4%BA%8B&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;PHP 的故事&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: square;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#php-%E4%BD%BF%E7%94%A8%E7%BB%9F%E8%AE%A1&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;PHP 使用统计&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.wpjzb.com/php-benchmarks/#%E6%A6%82%E6%8B%AC&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;概括&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;/div&gt;&lt;h2 class=&quot;wp-block-heading&quot; id=&quot;我们的-php-基准测试&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 20px 0px 25px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 28px; line-height: 35px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;我们的 PHP 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#our-php-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;为了评估内容管理系统或框架在最新 PHP 版本下的性能，我们进行了基准测试。为了保持一致性，我们对每个测试的内容管理系统或框架都使用了相同的机器和参数。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;本文中的基准测试是在以下环境中进行的：&lt;/p&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;机器：&lt;/span&gt;英特尔 Cascade Lake（30 核 CPU），主频 3.10GHz，120GB 内存，1TB 硬盘。由谷歌云平台支持的计算优化（C2）虚拟机，在隔离容器中运行。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;操作系统：&lt;/span&gt;Ubuntu 20.04.6 LTS (Focal Fossa)。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;内容管理系统和框架：&lt;/span&gt;默认设置，使用&lt;a href=&quot;https://ddev.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;DDEV&lt;/a&gt;&amp;nbsp;v1.22.5&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;amd64&lt;/code&gt;&amp;nbsp;安装在&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;nginx-fpm&lt;/code&gt;&amp;nbsp;上，作为基于 1.22.0 版映像的&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;--webserver-type&lt;/code&gt;&amp;nbsp;。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;PHP 版本：&lt;/span&gt;7.4.33, 8.1.26, 8.2.13, 8.3.0&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;数据库：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;ddev-dbserver-mariadb-10.4&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;工具：&lt;/span&gt;&lt;a href=&quot;https://httpd.apache.org/docs/2.4/programs/ab.html&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;AB – Apache HTTP 服务器基准测试工具&lt;/a&gt;。&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;并发：15 个请求同时提出。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;请求：每节课 1000 次请求。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果：&lt;/span&gt;以每秒请求次数（req/s）表示。结果越高，响应速度越快。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 class=&quot;wp-block-heading&quot; id=&quot;内容管理系统和框架&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 20px 0px 25px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 28px; line-height: 35px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;内容管理系统和框架&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#cmss-and-frameworks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 以其丰富的框架和内容管理系统库而闻名。我们在选择测试对象时考虑了几个方面，包括&lt;/p&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;受欢迎程度&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;实时网站&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;市场地位&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;使用趋势&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;搜索量（美国）&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;例如，WordPress 一直在发光发热，占整个内容管理系统市场的 62%，拥有&lt;a href=&quot;https://trends.builtwith.com/websitelist/WordPress&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;超过 3400 万个实时网站&lt;/a&gt;，而且&lt;a href=&quot;https://trends.builtwith.com/cms/WordPress&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;随着时间的推移，其使用率也在急剧上升&lt;/a&gt;。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;另一方面，虽然 Statamic 在网络上的覆盖面较小，只有&lt;a href=&quot;https://trends.builtwith.com/websitelist/Statamic&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;约 10,000 个网站&lt;/a&gt;，但它的&lt;a href=&quot;https://trends.builtwith.com/cms/Statamic&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;快速增长&lt;/a&gt;和日益普及引起了我们的关注。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;我们还包括 Symfony。尽管与之前的飙升相比，Symfony 在过去几年中的&lt;a href=&quot;https://trends.builtwith.com/framework/symfony-PHP-Framework&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;受欢迎程度有所下降，但它仍然拥有许多活跃的网站&lt;/a&gt;和庞大的月搜索量。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;我们选择作为基准的其他内容管理系统和框架也符合同样的标准。&lt;/p&gt;&lt;div class=&quot;gb-container gb-container-26f690a1 warning-box&quot; style=&quot;box-sizing: inherit; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 1.5em 2em 0.05em; margin-bottom: 1.5em; border-radius: 5px; background-image: linear-gradient(145deg, rgb(234, 236, 255), rgb(255, 234, 234)); color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px;&quot;&gt;所有内容管理系统和框架都按照默认安装设置进行了测试。&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;接下来，让我们来看看结果。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;word-press&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;WordPress&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#wordpress&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://wordpress.org/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;WordPress&lt;/a&gt;&amp;nbsp;是一种开源内容管理系统，无需任何编程知识，即可轻松管理网站的重要方面。WordPress 对初学者非常友好，安装和维护 WordPress 不需要懂代码，因此对任何不懂编程的人来说，WordPress 都是非常有吸引力的网站、博客或网络商店。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://w3techs.com/technologies/details/cm-wordpress&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;超过 42% 的实时网站&lt;/a&gt;背后都有 WordPress 的身影。换个角度看，这相当于所有知名内容管理系统的 62%。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;开源 WordPress 生态系统是有经验的程序员的福音，他们希望在一个强大、灵活、可靠的平台上构建自己的应用程序。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;WordPress 还被广泛用作使用 React、Vue.js 等现代前端框架构建的应用程序的无头后台内容管理系统。您可以将 WordPress 内容管理功能与 Gatsby、Hugo、VuePress 和 Next.js 等静态网站生成器结合使用。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;您还可以为整个 WordPress 网站创建静态版本，以提高安全性和性能。这些现代方法首先为动态、时尚和闪亮的网络应用程序提供了一个可靠的平台，使其脱颖而出，吸引访客。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;wordpress-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;WordPress 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#wordpress-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;WordPress 6.4.2 和 6.2.2。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;84,257,000 字节（WordPress 6.4.2）；52,684,000 字节（WordPress 6.2.2）。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;WordPress 6.4.2 的结果：&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 7.4：149 res/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：153 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：158 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：169 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;WordPress 6.2.2 的结果：&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 7.4：147 res/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：151 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：153 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：165 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-wordpress-v2.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4194&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1189,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1a\u00a0WordPress \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;\u00a0WordPress \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051151172462031189945.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：&amp;nbsp;WordPress 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;WordPress 6.4.2 和 6.2.2 在 PHP 7.4、8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;WordPress 的 PHP 版本越新，性能越好。而且越新越好。对于担心 WordPress 网站的安全性和性能的人来说，升级到 PHP 8.3 是必须的。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;作为更新，我们还对 WordPress 6.4.2 进行了基准测试。它在所有 PHP 版本中的表现都优于它的老兄弟。结果显示，WordPress 6.2.2 在较新的 PHP 版本中表现更好。从 PHP 8.2 到 8.3，速度提高了约 7%，与我们在 WordPress 6.2.2 中获得的结果类似。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;要充分利用 WordPress，请学习&lt;a href=&quot;https://www.wpjzb.com/how-to-speed-up-wordpress/&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;如何加快网站速度&lt;/a&gt;。众所周知，WordPress 需要一个良好的服务器才能运行良好。使用&lt;a href=&quot;https://www.wpjzb.com/service/&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;WordPress建站帮的专业服务&lt;/a&gt;，您可以获得最佳的托管服务、速度和安全性，并轻松管理您的 WordPress 网站。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;woo-commerce&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;WooCommerce&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#woocommerce&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://woo.com/wordpress-ecommerce/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;WooCommerce&lt;/a&gt;&amp;nbsp;是最常用的在线销售平台。它可以帮助商家和开发人员建立长期成功的业务。WooCommerce 拥有互联网上近 20% 的电子商务网站，它可定制、开源并基于 WordPress 构建。有了 WooCommerce，您就拥有了安全、成熟、可靠的在线销售基础设施。此外，您还可以利用 WordPress 的插件、WP-CLI、钩子、过滤器和 REST API 端点来管理您的商店。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;woocommerce-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;WooCommerce 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#woocommerce-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;在 WordPress 6.2.2 上运行 Woo 7.9.0。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/product/product/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;57 470 000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 7.4：48 res/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：49 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：49 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：58 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-woocommerce.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4193&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:721,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1a\u00a0WooCommerce \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;\u00a0WooCommerce \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051151172462031162577.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：&amp;nbsp;WooCommerce 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;WooCommerce 7.9.0 在 WordPress 6.2.2、PHP 7.4、8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;如果您的 WooCommerce 网站使用的是旧版本的 PHP，请考虑尽快升级，以获得 PHP 8.3 的性能提升。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;laravel&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Laravel&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#laravel&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://laravel.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;Laravel&lt;/a&gt;&amp;nbsp;是一个开源 PHP 框架，为网络开发人员提供了构建现代 PHP 网络应用程序的工具和资源。命令行界面（Artisan）、本地身份验证和模型-视图-控制器（MVC）架构模式等内置功能使 Laravel 功能多样、易于使用，因而越来越受欢迎。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;laravel-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Laravel 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#laravel-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;Laravel 10.16.1.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;27,514,000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：611 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：670 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：925 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-laravel.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4192&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:721,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aLaravel \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;Laravel \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051152172462031291099.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：Laravel 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;Laravel 10.16.1 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;从 PHP 8.1 升级到 8.2 时，Laravel 的性能有了显著提高。使用 PHP 8.3，性能比 8.2 又提高了 38%。升级到 8.3 完全没有问题。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;drupal&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Drupal&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#drupal&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://www.drupal.org/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;Drupal&lt;/a&gt;&amp;nbsp;是一个功能强大、可扩展的内容管理系统，具有强大的标准功能，如简单的内容创作、可靠的性能、出色的安全性、灵活性和模块化，这是其核心原则之一。它的工具可以帮助你构建动态网络体验所需的多功能、结构化内容。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;它是创建集成数字框架的最佳选择，因为你可以用许多附加组件来扩展它。Drupal 更像是一个内容管理系统开发平台，而不是一个开箱即用的网站。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;2011 年发布的 Drupal 7 一直是&lt;a href=&quot;https://www.drupal.org/project/usage/drupal&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;使用率最高的版本&lt;/a&gt;，因此我们将其与最新、改进最大的 Drupal 10 一起进行了基准测试。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Drupal 7 的生命周期&lt;a href=&quot;https://www.drupal.org/psa-2022-02-23&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;原定于 2023 年 12 月结束&lt;/a&gt;，但后来&lt;a href=&quot;https://www.drupal.org/about/drupal-7/d7eol/partners&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;延长到了 2025 年 1 月&lt;/a&gt;，以便用户有更多时间进行迁移。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;drupal-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Drupal 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#drupal-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;Drupal 10.1.1 和 7.98。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;19,102,000 字节（Drupal 10）；8,075,000 字节（Drupal 7）。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果（Drupal 10）：&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：922 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：941 请求/秒。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：1432 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果（Drupal 7）：&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：661 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：753 请求/秒。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：823 请求/秒。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-drupal1.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4191&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1189,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aDrupal \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;Drupal \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051152172462031269652.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：Drupal 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;Drupal 7.98 和 Drupal 10.1.1 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;如果您仍在使用旧版本的 Drupal，除了利用所有新功能和即将到来的改进之外，出于性能和安全方面的考虑，请考虑更新它。对于大多数 Drupal 社区来说，Drupal 8、9 和 10 之间的更新都是无缝的。值得从 7 升级到 8，为 Drupal 10 做好准备，并快速启动和运行它。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;从基准测试结果来看，从 Drupal 7 升级到 10 显然能显著提高性能。将 PHP 8.3 与 Drupal 10 结合使用，可以极大地提高速度，满足访客的需求并保持他们的参与度，因此升级是最明智之举。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;joomla&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Joomla&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#joomla&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://www.joomla.org/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;Joomla&lt;/a&gt;&amp;nbsp;是一种流行的开源内容管理系统，它建立在模型-视图-控制器网络应用程序框架之上，可以独立于内容管理系统使用，构建在线应用程序。它的特点是系统灵活，扩展库庞大，易于扩展和定制。Joomla 具有内置的搜索优化功能，并因在漏洞传播之前快速发布安全补丁而享有盛誉。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;joomla-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Joomla 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#joomla-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;Joomla 4.3.3。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;8,111,000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：274 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：265 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：341 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-joomla.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4190&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:721,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aJoomla \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;Joomla \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051152172462031294836.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：Joomla 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;Joomla 4.3.3 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;在我们的测试中，用于 Joomla 的 PHP 8.1 和 8.2 基准差异不大。而 PHP 8.3 则提升了近 30%，因此 8.3 是运行网站的最明智选择。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;symfony&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Symfony&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#symfony&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://symfony.com/what-is-symfony&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;Symfony&lt;/a&gt;&amp;nbsp;是一个丰富、灵活的后端框架，适用于复杂的应用程序。它的 MVC 架构提供了专为构建系统化和可扩展的 PHP 网络应用程序而设计的工具和功能，包括支持多种环境和强大的缓存系统。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;它在开源社区很受欢迎，拥有大量的组件和捆绑包。对于实现长期业务目标和吸引大量受众的网站来说，Symfony 是一个不错的选择。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;symfony-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Symfony 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#symfony-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;Symfony 6.3.0。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;559,000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：931 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：997 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：1182 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-symfony.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4189&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:720,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aSymfony \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;Symfony \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051152172462031260172.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：Symfony 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;Symfony 6.3.0 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Symfony 天生速度快。在我们的测试中，PHP 8.1 和 8.2 的表现类似，但 8.3 比它们都要快。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;code-igniter&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;CodeIgniter&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#codeigniter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://codeigniter.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;CodeIgniter&lt;/a&gt;&amp;nbsp;是一个 PHP 框架，专为需要简单工具包来创建全功能网络应用程序的开发人员而设计。它采用 MVC 方法来培养简洁性。它的核心系统占用空间极小，只需要几个小型库，其默认登陆页面的性能优于我们测试过的所有平台和框架。您可以从小规模开始，速度快得惊人，然后根据需要进行扩展。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;codeigniter-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;CodeIgniter 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#codeigniter-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;CodeIgniter 4.3.6。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;17,776,993 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：1120 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：1180 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：1684 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-codeigniter.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4188&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:720,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aCodeIgniter \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;CodeIgniter \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051153172462031334446.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：CodeIgniter 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;CodeIgniter 4.3.6 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;CodeIgniter 的默认安装速度很快，非常快。8.1 和 8.2 的 PHP 基准测试结果相似，8.2 比 8.1 稍微快一些。PHP 8.3 的性能提高了 42%，使升级成为不二之选。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;craft-cms&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Craft CMS&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#craft-cms&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://craftcms.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;Craft CMS&lt;/a&gt;&amp;nbsp;是一个开源平台，专为创建营销和电子商务网站而设计。Craft 的理念是围绕内容而不是相反来构建 CMS。Craft 拥有直观的用户界面和完全可定制的后台，可充分利用内容创建功能，因此您可以将更多时间用于制作内容，而不是用于构建网站。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;craft-cms-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;Craft CMS 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#craft-cms-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;Craft 4.4.16.1.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL&lt;/span&gt;：&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;6,594,000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：358 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：354 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：443 请求/秒。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-craftcms.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4187&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:721,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1a\u00a0Craft CMS \u57fa\u51c6&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;\u00a0Craft CMS \u57fa\u51c6&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051153172462031380782.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：&amp;nbsp;Craft CMS 基准&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;Craft CMS 4.4.16.1 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;在 PHP 8.1 和 8.2 上运行时，Craft 的性能类似，但 PHP 8.3 又将网站性能提高了约 25%。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;open-cart&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;OpenCart&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#opencart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://www.opencart.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;OpenCart&lt;/a&gt;&amp;nbsp;是一个开放源码的电子商务管理平台，可以从一个后台处理一个或多个在线商店。OpenCart 拥有友好的用户界面，使网站管理员和终端用户可以更轻松地进行导航。我们的理念是，您只需花最少的精力就能创建并运行一个网店，然后使用可用的扩展功能对其进行定制。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;opencart-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;OpenCart 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#opencart-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_1_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_1&quot; name=&quot;aswift_1&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=1979246780&amp;adf=1005763093&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620217&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217797&amp;bpp=2&amp;bdt=1393&amp;idt=-M&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724609277%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0&amp;nras=2&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=11019&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=9400&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=0&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=2&amp;uci=a!2&amp;btvi=1&amp;fsb=1&amp;dtd=35&quot; data-google-container-id=&quot;a!2&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CNSEofyGkYgDFRLIFgUd_ZwN9A&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;OpenCart 4.0.2.2.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;33,014,000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：151 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：154 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：164 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-opencart.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4186&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:721,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aOpenCart \u57fa\u51c6\u6d4b\u8bd5&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;OpenCart \u57fa\u51c6\u6d4b\u8bd5&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051153172462031359013.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：OpenCart 基准测试&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;OpenCart 4.0.2.2 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;OpenCart 在 PHP 8.1 上运行流畅，在 8.2 上运行速度稍快，而 8.3 则大大推动了它的运行，并邀请您升级。&lt;/p&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_2_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_2&quot; name=&quot;aswift_2&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=1979246780&amp;adf=2390657923&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620217&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217797&amp;bpp=1&amp;bdt=1392&amp;idt=-M&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724609277%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0%2C810x280&amp;nras=3&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=11893&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=9400&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=0&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=3&amp;uci=a!3&amp;btvi=2&amp;fsb=1&amp;dtd=126&quot; data-google-container-id=&quot;a!3&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CJmjpvyGkYgDFcbKFgUdDsMEEA&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;statamic&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Statamic&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#statamic&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://statamic.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;Statamic&lt;/a&gt;&amp;nbsp;是基于 Laravel 的开源内容管理系统。它是一个高度灵活的框架，可以将内容、模板、资产和设置存储在文件而不是数据库中，从而使版本控制变得轻而易举。它能适应你的需求，让你边做边建。如果你的内容在数据库中，你可以将它连接到数据库。你还可以导出到静态网站，在前端无需使用 Laravel 和 PHP。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;statamic-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Statamic 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#statamic-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;Statamic 4.13.2.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;7,233,000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：58 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：64 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：72 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-statamic.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4185&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:721,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aStatamic \u57fa\u51c6\u6d4b\u8bd5&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;Statamic \u57fa\u51c6\u6d4b\u8bd5&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051154172462031486263.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：Statamic 基准测试&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;Statamic 4.13.2 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;每次 PHP 小版本升级，Statamic 的性能都会提高。使用 PHP 8.2，速度比 8.1 提升约 10%。升级到 8.3 后，速度提高了约 12%。&lt;/p&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_3_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_3&quot; name=&quot;aswift_3&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=1979246780&amp;adf=3499888215&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620217&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217797&amp;bpp=1&amp;bdt=1393&amp;idt=-M&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724609277%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0%2C810x280%2C810x280&amp;nras=4&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=12969&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=9400&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=0&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=4&amp;uci=a!4&amp;btvi=3&amp;fsb=1&amp;dtd=131&quot; data-google-container-id=&quot;a!4&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CPvZpvyGkYgDFfDiFgUdvPADPQ&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;请注意，我们安装和测试 Statamic 时使用的是默认配置，其中包括已激活的开发人员模式。如果在生产模式下运行，性能可能会有所提高。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;typo-3&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Typo3&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#typo3&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a href=&quot;https://typo3.org/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;Typo3&lt;/a&gt;&amp;nbsp;是一个开源内容管理系统，采用多层系统，提供 API 以访问数据库中记录的信息，如内容、用户权限和访问、内容编辑和文件管理。Typo3 可通过插件、后台模块、皮肤和第三方应用程序进行扩展。它是一个强大而可靠的系统，甚至可以支持大型网站。&lt;/p&gt;&lt;h4 class=&quot;wp-block-heading&quot; id=&quot;typo3-benchmarks&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; line-height: 20px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;Typo3 基准测试&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#typo3-benchmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;已测试版本：&lt;/span&gt;Typo3 12.4.4。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;测试过的 URL：&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;大小：&lt;/span&gt;2,085,000 字节。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.1：509 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.2：461 req/s。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&amp;nbsp;PHP 8.3：598 req/s。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-typo3.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4184&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:721,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aTypo3 \u57fa\u51c6\u6d4b\u8bd5&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;Typo3 \u57fa\u51c6\u6d4b\u8bd5&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051154172462031413919.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：Typo3 基准测试&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;Typo3 12.4.4 在 PHP 8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;在我们的测试中，Typo3 在 PHP 8.1 下的性能略好于 8.2，这一点令人惊讶。但考虑到出色的性能和更高的安全性，升级到 8.3 是最好的选择。&lt;/p&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_4_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_4&quot; name=&quot;aswift_4&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=1979246780&amp;adf=458647033&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620217&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217797&amp;bpp=2&amp;bdt=1393&amp;idt=-M&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724609277%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0%2C810x280%2C810x280%2C810x280&amp;nras=5&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=14117&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=9400&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=0&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=5&amp;uci=a!5&amp;btvi=4&amp;fsb=1&amp;dtd=136&quot; data-google-container-id=&quot;a!5&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CNCGp_yGkYgDFWvIFgUd4moPRg&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;h2 class=&quot;wp-block-heading&quot; id=&quot;php-的故事&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 20px 0px 25px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 28px; line-height: 35px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 的故事&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#the-php-story&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 于 1994 年由 Rasmus Lerdorf 创建，1995 年向公众发布，因其与数据库通信的能力而广受欢迎。从那时起，PHP 逐步采用面向对象编程模式，发展成为一种成熟、灵活、强大的模块化语言，其重点在于可重用性和可维护性。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 广泛的库和框架生态系统使其更受欢迎，也更易于开发。其结果是增强了安全性和附加功能，使 PHP 成为构建智能、动态和复杂网络应用程序的可靠选择。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;2015 年 12 月发布的 PHP 7 对性能进行了重大改进，是迄今为止速度最快、效率最高的 PHP 主版本。在此基础上，PHP 8.0、8.1 和 8.2 带来了许多新功能和优化，并进一步提高了一致性和性能。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;2023 年 11 月发布的&lt;a href=&quot;https://www.php.net/releases/8.3/en.php&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;PHP 8.3&lt;/a&gt;&amp;nbsp;引入了新函数、改进了&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;readonly&lt;/code&gt;&amp;nbsp;类、增加了最近添加的&amp;nbsp;&lt;code style=&quot;box-sizing: inherit; background-color: rgb(34, 39, 46); border-radius: 4px; color: rgb(173, 186, 199); display: inline-block; padding: 0.4em 0.7em; vertical-align: middle; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace;&quot;&gt;Randomizer&lt;/code&gt;&amp;nbsp;类、堆栈溢出检测、提高了性能等等。&lt;/p&gt;&lt;h3 class=&quot;wp-block-heading&quot; id=&quot;php-使用统计&quot; style=&quot;box-sizing: inherit; margin: 0px 0px 20px; padding: 0px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 18px; line-height: 22.5px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 使用统计&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#php-usage-statistics&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 仍是网络应用程序的主要编程语言。超过 76% 的网站使用服务器端脚本：&lt;/p&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); height: auto !important;&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-server-side-langs.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4183&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1189,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aPHP \u4f7f\u7528\u7edf\u8ba1&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;PHP \u4f7f\u7528\u7edf\u8ba1&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto !important;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051154172462031414258.png&quot;&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_5_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_5&quot; name=&quot;aswift_5&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=537767911&amp;adf=2614664376&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620217&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217797&amp;bpp=1&amp;bdt=1393&amp;idt=1&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724609277%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724609277%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0%2C810x280%2C810x280%2C810x280%2C810x280&amp;nras=6&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=15358&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=9400&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=0&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=6&amp;uci=a!6&amp;btvi=5&amp;fsb=1&amp;dtd=142&quot; data-google-container-id=&quot;a!6&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CJOzp_yGkYgDFeHiFgUdvmsXsA&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：PHP 使用统计&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 295.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;分布式服务器端驱动的网络应用程序 (&lt;a href=&quot;https://w3techs.com/technologies/overview/programming_language&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;W3Techs&lt;/a&gt;)。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;如果我们看一下服务器端编程语言的市场地位，就会发现 JavaScript 深受高流量应用程序开发人员的欢迎，而 PHP 则出现在更多的网站上。&lt;/p&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-market-positions.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4182&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1005,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1a\u670d\u52a1\u5668\u7aef\u7f16\u7a0b\u8bed\u8a00\u7684\u5e02\u573a\u5730\u4f4d&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;\u670d\u52a1\u5668\u7aef\u7f16\u7a0b\u8bed\u8a00\u7684\u5e02\u573a\u5730\u4f4d&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051154172462031495432.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：服务器端编程语言的市场地位&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;服务器端编程语言的市场地位。(&lt;a href=&quot;https://w3techs.com/technologies/market/programming_language&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;W3Techs&lt;/a&gt;)&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;许多强大和高流量的网站都使用 PHP，包括但不限于：&lt;/p&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_6_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_6&quot; name=&quot;aswift_6&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=1979246780&amp;adf=3230922589&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620278&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217808&amp;bpp=1&amp;bdt=1404&amp;idt=1&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724620219%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724620219%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724620219%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0%2C810x280%2C810x280%2C810x280%2C810x280%2C810x280&amp;nras=7&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=16287&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=10117&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;psts=AOrYGsn9T8JSEBJR5AzbMpqOqgiYnCtf9LFKGgRAFiRE2e63_nPuCBXIluFzeLx2E_5EbaLTjVdTVZhh95_ubxoSu1WXKA%2CAOrYGsku3BGmqHr61Isus2y8EjYoELpRKI32WG4sGNmU0NqhZDVKsMXO_aeumBi0uS8KKGsuEETlk-vzM3I3Jdzkeuto0A%2CAOrYGsnJ6h8Uc7_2-cDqADZgU3rpIqoycoWrloPrhgpu5lDMy49o1CyACSgD9_l5QBv9UTKYBcswKEK5Wl1NeIBQrh8FBQ%2CAOrYGsn9cknXvPDZ5eM2rJw5VbSOEri_57HPx6qaIgcccuKL-4XyYgFUIPvFvyIcRHusIEhXFOjFzEtluN99ZlYZTKqWRg%2CAOrYGsmM7hKTbMGsvsYWA-ICkR2JKpOErM7uupiFrFkhRSu0-RrY3vu9ZBKDHPm7U-tX4Jn6h4iTfpqhq6sAKM-vpP4qZhDN&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=3&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=7&amp;uci=a!7&amp;btvi=6&amp;fsb=1&amp;dtd=60786&quot; data-google-container-id=&quot;a!7&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CLjonZmHkYgDFbPIFgUd-4MuxA&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;Facebook.com&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Microsoft.com&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Wikipedia.org&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;WordPress.org&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Vimeo.com&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;MSN.com&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;WordPress.com&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Mozilla.org&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;多年来，PHP 凭借其强大的构造、一致性、维护性和灵活性，一直保持着领先地位：&lt;/p&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-langs-through-time.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4181&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1189,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1a\u7f16\u7a0b\u8bed\u8a00\u968f\u65f6\u95f4\u7684\u4f7f\u7528\u60c5\u51b5&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;\u7f16\u7a0b\u8bed\u8a00\u968f\u65f6\u95f4\u7684\u4f7f\u7528\u60c5\u51b5&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051154172462031429965.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：编程语言随时间的使用情况&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;编程语言随时间的使用情况 (&lt;a href=&quot;https://w3techs.com/technologies/history_overview/programming_language/ms/y&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;W3Techs&lt;/a&gt;)&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;尽管 PHP 的开发人员会定期推出更新和改进，但用户有时会对升级到最新版本心存疑虑。这可能是个错误。任何应用程序的最新稳定版本都是最丰富、最安全的。&lt;/p&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_7_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_7&quot; name=&quot;aswift_7&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=1979246780&amp;adf=1833977734&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620278&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217815&amp;bpp=1&amp;bdt=1410&amp;idt=1&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724620219%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724620219%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724620219%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0%2C810x280%2C810x280%2C810x280%2C810x280%2C810x280%2C810x280&amp;nras=8&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=17442&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=11144&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;psts=AOrYGsn9T8JSEBJR5AzbMpqOqgiYnCtf9LFKGgRAFiRE2e63_nPuCBXIluFzeLx2E_5EbaLTjVdTVZhh95_ubxoSu1WXKA%2CAOrYGsku3BGmqHr61Isus2y8EjYoELpRKI32WG4sGNmU0NqhZDVKsMXO_aeumBi0uS8KKGsuEETlk-vzM3I3Jdzkeuto0A%2CAOrYGsnJ6h8Uc7_2-cDqADZgU3rpIqoycoWrloPrhgpu5lDMy49o1CyACSgD9_l5QBv9UTKYBcswKEK5Wl1NeIBQrh8FBQ%2CAOrYGsn9cknXvPDZ5eM2rJw5VbSOEri_57HPx6qaIgcccuKL-4XyYgFUIPvFvyIcRHusIEhXFOjFzEtluN99ZlYZTKqWRg%2CAOrYGsmM7hKTbMGsvsYWA-ICkR2JKpOErM7uupiFrFkhRSu0-RrY3vu9ZBKDHPm7U-tX4Jn6h4iTfpqhq6sAKM-vpP4qZhDN&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=3&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=8&amp;uci=a!8&amp;btvi=7&amp;fsb=1&amp;dtd=60857&quot; data-google-container-id=&quot;a!8&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CPGwopmHkYgDFcziFgUdyBYKtA&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;当 PHP 8.0 发布时，社区中的许多人对升级感到不安，担心与前一个版本 7.4 不兼容。此外，许多网络托管服务提供商根本没有努力让他们的客户接受新版本。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 7.4 仍是采用最多的&lt;a href=&quot;https://w3techs.com/technologies/details/pl-php&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;子版本&lt;/a&gt;，在 40% 的 PHP 支持的网站中都能找到它的身影。&lt;/p&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); height: auto !important;&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-php-subversions.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4180&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1189,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aPHP \u5b50\u7248\u672c\u7684\u4f7f\u7528&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;PHP \u5b50\u7248\u672c\u7684\u4f7f\u7528&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto !important;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051155172462031592603.png&quot;&gt;&lt;div class=&quot;google-auto-placed ap_container&quot; style=&quot;box-sizing: inherit; width: 810px; height: auto; clear: both; text-align: center;&quot;&gt;&lt;ins data-ad-format=&quot;auto&quot; class=&quot;adsbygoogle adsbygoogle-noablate&quot; data-ad-client=&quot;ca-pub-4968447755988397&quot; data-adsbygoogle-status=&quot;done&quot; data-ad-status=&quot;filled&quot; style=&quot;box-sizing: inherit; text-decoration-line: none; margin: auto; display: block; background-color: transparent; height: 280px;&quot;&gt;&lt;div id=&quot;aswift_8_host&quot; style=&quot;box-sizing: inherit; border: none; height: 280px; width: 810px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;&quot;&gt;&lt;iframe id=&quot;aswift_8&quot; name=&quot;aswift_8&quot; sandbox=&quot;allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation&quot; width=&quot;810&quot; height=&quot;280&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; src=&quot;https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4968447755988397&amp;output=html&amp;h=280&amp;adk=537767911&amp;adf=2597672515&amp;w=810&amp;abgtt=7&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1724620278&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=3922244284&amp;ad_type=text_image&amp;format=810x280&amp;url=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;host=ca-host-pub-2644536267352236&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=810&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiNy4wLjAuMzAwMCIsbnVsbCwwLG51bGwsIjY0IixbWyJDaHJvbWl1bSIsIjcuMC4wLjMwMDAiXSxbIi5Ob3QvQSlCcmFuZCIsIjk5LjAuMC4wIl1dLDBd&amp;dt=1724620217823&amp;bpp=1&amp;bdt=1419&amp;idt=0&amp;shv=r20240821&amp;mjsv=m202408150101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Da2685aa66bbecd14%3AT%3D1724449517%3ART%3D1724620219%3AS%3DALNI_MbxQgT3ZBUbcWUhfkDvPwxnZ3OlFg&amp;gpic=UID%3D00000ed38f28ce0a%3AT%3D1724449517%3ART%3D1724620219%3AS%3DALNI_MZbkwu5eUiTePREXeETiTKtClwQhA&amp;eo_id_str=ID%3D5b47c8b8a217c035%3AT%3D1724449517%3ART%3D1724620219%3AS%3DAA-Afjb9Vqhu5FmVSOTLZJqPvULQ&amp;prev_fmts=0x0%2C810x280%2C810x280%2C810x280%2C810x280%2C810x280%2C810x280%2C810x280&amp;nras=9&amp;correlator=1549424266073&amp;frm=20&amp;pv=1&amp;u_tz=480&amp;u_his=50&amp;u_h=1728&amp;u_w=3072&amp;u_ah=1728&amp;u_aw=2962&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=1068&amp;ady=18318&amp;biw=2946&amp;bih=1594&amp;scr_x=0&amp;scr_y=12030&amp;eid=44759875%2C44759926%2C44759837%2C95330276%2C95334829%2C95338227&amp;oid=2&amp;psts=AOrYGsn9T8JSEBJR5AzbMpqOqgiYnCtf9LFKGgRAFiRE2e63_nPuCBXIluFzeLx2E_5EbaLTjVdTVZhh95_ubxoSu1WXKA%2CAOrYGsku3BGmqHr61Isus2y8EjYoELpRKI32WG4sGNmU0NqhZDVKsMXO_aeumBi0uS8KKGsuEETlk-vzM3I3Jdzkeuto0A%2CAOrYGsnJ6h8Uc7_2-cDqADZgU3rpIqoycoWrloPrhgpu5lDMy49o1CyACSgD9_l5QBv9UTKYBcswKEK5Wl1NeIBQrh8FBQ%2CAOrYGsn9cknXvPDZ5eM2rJw5VbSOEri_57HPx6qaIgcccuKL-4XyYgFUIPvFvyIcRHusIEhXFOjFzEtluN99ZlYZTKqWRg%2CAOrYGsmM7hKTbMGsvsYWA-ICkR2JKpOErM7uupiFrFkhRSu0-RrY3vu9ZBKDHPm7U-tX4Jn6h4iTfpqhq6sAKM-vpP4qZhDN&amp;pvsid=4216077010485738&amp;tmod=968450328&amp;uas=3&amp;nvt=3&amp;ref=https%3A%2F%2Fwww.wpjzb.com%2Fphp-benchmarks%2F&amp;fc=1408&amp;brdim=110%2C0%2C110%2C0%2C2962%2C0%2C2962%2C1728%2C2962%2C1594&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;bz=1&amp;psd=W251bGwsbnVsbCxudWxsLDNd&amp;ifi=9&amp;uci=a!9&amp;btvi=8&amp;fsb=1&amp;dtd=60933&quot; data-google-container-id=&quot;a!9&quot; tabindex=&quot;0&quot; title=&quot;Advertisement&quot; aria-label=&quot;Advertisement&quot; data-google-query-id=&quot;CM6Np5mHkYgDFUTKFgUdb4EBOQ&quot; data-load-complete=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 810px; height: 280px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/ins&gt;&lt;/div&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：PHP 子版本的使用&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 295.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;PHP 子版本的使用&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;如果您使用的是旧版本的 PHP，可以考虑从次要版本到次要版本逐步升级，并在中间进行必要的调整。这个过程不容易出错。例如，不要尝试直接从 7.4 升级到 8.3。先升级到 8.0，然后进行调整和测试。然后，升级到 8.1，进行调整和测试。然后升级到 8.2，最后升级到 8.3。&lt;/p&gt;&lt;div class=&quot;gb-container gb-container-42b9d2de warning-box&quot; style=&quot;box-sizing: inherit; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 1.5em 2em 0.05em; margin-bottom: 1.5em; border-radius: 5px; background-image: linear-gradient(145deg, rgb(234, 236, 255), rgb(255, 234, 234)); color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;div class=&quot;gb-headline gb-headline-3c8c7f89 gb-headline-text&quot; style=&quot;box-sizing: inherit; font-size: 30px;&quot;&gt;信息：&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px;&quot;&gt;升级您经常使用的所有软件，有助于提高互联网的速度和安全性。&lt;/p&gt;&lt;/div&gt;&lt;h2 class=&quot;wp-block-heading&quot; id=&quot;概括&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 20px 0px 25px; border: 0px; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 28px; line-height: 35px; color: rgb(29, 39, 51); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;概括&lt;a href=&quot;https://kinsta.com/blog/php-benchmarks/#summary&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; text-decoration-line: none;&quot;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;简而言之，大多数经过测试的内容管理系统和框架都能在较新的 PHP 版本下运行得更好。在可能的情况下，选择在最新版本的技术栈中运行应用程序。&lt;/p&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-all-cmss-performance.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4179&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1189,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1a\u6240\u6709\u6d4b\u8bd5\u7684 CMS \u548c\u6846\u67b6\u5728 PHP 7.4\u30018.1\u30018.2 \u548c 8.3 \u4e0a\u7684\u6027\u80fd&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;\u6240\u6709\u6d4b\u8bd5\u7684 CMS \u548c\u6846\u67b6\u5728 PHP 7.4\u30018.1\u30018.2 \u548c 8.3 \u4e0a\u7684\u6027\u80fd&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051155172462031575722.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：所有测试的 CMS 和框架在 PHP 7.4、8.1、8.2 和 8.3 上的性能&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;所有测试的内容管理系统和框架在 PHP 7.4、8.1、8.2 和 8.3 上的性能（以请求/秒为单位）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;PHP 8.3 提供了出色的结果。除了新功能和更新外，在我们的测试中，8.3 被证明是最快的测试版本，为测试的内容管理系统和框架提供了高达 52.20% 的性能提升。&lt;/p&gt;&lt;div class=&quot;wp-block-image&quot; style=&quot;box-sizing: inherit; margin-bottom: 1.5em; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;figure data-wp-context=&quot;{&amp;quot;uploadedSrc&amp;quot;:&amp;quot;https:\/\/www.wpjzb.com\/wp-content\/uploads\/2024\/04\/phpbench2023-php-performance-increase.png&amp;quot;,&amp;quot;figureClassNames&amp;quot;:&amp;quot;aligncenter size-full&amp;quot;,&amp;quot;figureStyles&amp;quot;:null,&amp;quot;imgClassNames&amp;quot;:&amp;quot;wp-image-4178&amp;quot;,&amp;quot;imgStyles&amp;quot;:null,&amp;quot;targetWidth&amp;quot;:2022,&amp;quot;targetHeight&amp;quot;:1189,&amp;quot;scaleAttr&amp;quot;:false,&amp;quot;ariaLabel&amp;quot;:&amp;quot;\u653e\u5927\u56fe\u7247\uff1aPHP 8.3 \u76f8\u5bf9\u4e8e PHP 8.2 \u7684\u6027\u80fd\u63d0\u5347&amp;quot;,&amp;quot;alt&amp;quot;:&amp;quot;PHP 8.3 \u76f8\u5bf9\u4e8e PHP 8.2 \u7684\u6027\u80fd\u63d0\u5347&amp;quot;}&quot; data-wp-interactive=&quot;core/image&quot; class=&quot;aligncenter size-full wp-lightbox-container&quot; style=&quot;margin: 0px auto; box-sizing: inherit; padding: 0px; border: 0px; display: table; flex-direction: column; position: relative; clear: both; max-width: 100%; height: auto;&quot;&gt;&lt;img src=&quot;https://www.homeh.cc/zb_users/upload/2024/08/20240826051155172462031518929.png&quot;&gt;&lt;button class=&quot;lightbox-trigger&quot; type=&quot;button&quot; aria-haspopup=&quot;dialog&quot; aria-label=&quot;放大图片：PHP 8.3 相对于 PHP 8.2 的性能提升&quot; data-wp-init=&quot;callbacks.initTriggerButton&quot; data-wp-on-async--click=&quot;actions.showLightbox&quot; data-wp-style--right=&quot;context.imageButtonRight&quot; data-wp-style--top=&quot;context.imageButtonTop&quot; style=&quot;box-sizing: inherit; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 17px; margin: 0px; font-weight: 400; line-height: 1.5; background: rgba(90, 90, 90, 0.25); border-width: initial; border-style: none; border-color: initial; cursor: zoom-in; appearance: button; padding: 0px; transition: opacity 0.2s ease 0s; align-items: center; backdrop-filter: blur(16px) saturate(180%); border-radius: 4px; display: flex; height: 20px; justify-content: center; opacity: 0; position: absolute; right: 16px; top: 15.5px; width: 20px; z-index: 100;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;12&quot; height=&quot;12&quot; fill=&quot;none&quot; viewbox=&quot;0 0 12 12&quot;&gt;&lt;path fill=&quot;#fff&quot; d=&quot;M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;&lt;figcaption class=&quot;wp-element-caption&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 0.5em; font-size: 13px; text-align: center; caption-side: bottom; display: table-caption;&quot;&gt;PHP 8.3 的性能比 PHP 8.2 有所提高（%）。&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;在&lt;a href=&quot;https://www.php.net/manual/en/migration83.php&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: inherit; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s;&quot;&gt;官方迁移指南&lt;/a&gt;中了解如何从 PHP 8.2 迁移到 8.3。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;说到网站和应用程序的性能，一切都要从良好的托管开始。如果服务器成为瓶颈，那么即使您在应用程序优化方面投入巨资也无济于事。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;如果不能在最需要的时候处理大流量高峰，就不值得为廉价主机付费。如果一个漂亮的网站经常不可用，那也是不值得的。&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-top: 0px; margin-bottom: 1.5em; padding: 0px; border: 0px; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;使用 WordPress建站帮的专业服务，您可以在一个可靠、可扩展的平台上托管和管理所有项目：&lt;/p&gt;&lt;ul class=&quot;wp-block-list list-paddingleft-2&quot; style=&quot;box-sizing: border-box; margin-bottom: 1.5em; margin-left: 3em; padding: 0px; border: 0px; list-style-position: initial; list-style-image: initial; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;li&gt;&lt;p&gt;WordPress 和 WooCommerce：WordPress建站帮提供一流的 WordPress 托管服务。所有计划都包括暂存环境、重定向、自动备份、SSL、PHP 版本切换、WP-CLI、SSH、Git、性能监控工具、ionCube 加载器和一键克隆。享受可扩展的服务器资源、坚如磐石的安全性和 24/7 全天候支持。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;应用程序和数据库：直接从 GitHub、Bitbucket 或 GitLab 仓库部署，无需外部开发工具。在持久存储或内部连接的数据库中存储数据，没有行数限制、查询限制，也无需为内部流量付费。通过 Web 终端访问应用程序。运行不受限制的 Cron 作业。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;静态网站：自己创建静态网站或 Jamstack 网站，或使用静态网站生成器。让我们运行构建过程并直接部署到边缘。这是全球速度和安全性的最佳体现。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 26 Aug 2024 05:10:56 +0800</pubDate></item><item><title>windows中DNS修复教程</title><link>https://www.homeh.cc/post/160.html</link><description>&lt;div class=&quot;dnstips&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 40px; height: 80px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;div class=&quot;dnstip1&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;dnstip2&quot; style=&quot;width: 70px; float: left;&quot;&gt;IPv4:&lt;/div&gt;&lt;div class=&quot;dnstip3&quot; style=&quot;float: left; width: 300px; padding-bottom: 10px;&quot;&gt;223.5.5.5&lt;br/&gt;223.6.6.6&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dnstip1&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;dnstip2&quot; style=&quot;width: 70px; float: left;&quot;&gt;IPv6:&lt;/div&gt;&lt;div class=&quot;dnstip3&quot; style=&quot;float: left; width: 300px; padding-bottom: 10px;&quot;&gt;2400:3200::1&lt;br/&gt;2400:3200:baba::1&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dnstip0&quot; style=&quot;clear: both; margin-top: 20px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; letter-spacing: 1px; white-space: normal;&quot;&gt;注意：IPv4，IPv6都需要修复&lt;/div&gt;&lt;div class=&quot;cl&quot; style=&quot;clear: both; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dnsdiv&quot; id=&quot;dns1&quot; style=&quot;padding-top: 50px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;div class=&quot;dns_p&quot; style=&quot;border-left: 3px solid rgb(0, 136, 255); padding-left: 10px; font-size: 20px;&quot;&gt;Windows 10配置&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;1.打开Windows 10系统控制面板，点击右上角的以图标方式显示，点击“网络和共享中心”选项。&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031742172461346285585.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;2.点击网络和共享中心左侧的“更改适配器设置”链接，如下图：&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031742172461346278616.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;3.选中正在联网的网络连接,我这里是WIFI连接，鼠标右键菜单里选择“属性”&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031742172461346211309.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;4.针对IPv4和IPv6的操作稍有不同，请注意您的配置是针对哪一种。&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——在网络连接属性窗口中选中“Internet 协议版本 4 (TCP/IPv4)”，然后点击“属性”。&lt;br/&gt;IPv6——在网络连接属性窗口中选中“Internet 协议版本 6 (TCP/IPv6)”，然后点击“属性”。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031742172461346213554.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;5.针对IPv4和IPv6的操作稍有不同，请注意您的配置是针对哪一种。&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——选择使用指定的DNS，在DNS服务器地址中输入223.5.5.5 和 223.6.6.6，输入后确定退出即设置完成。&lt;br/&gt;IPv6——选择使用指定的DNS，在DNS服务器地址中输入2400:3200::1 和 2400:3200:baba::1，输入后确定退出即设置完成。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031742172461346286049.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346368459.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;6.验证，打开CMD命令提示符，通过nslookup alidns.com 命令进行验证，若最终解析结果是配置的IPV4公共DNS（223.5.5.5或223.6.6.6）或IPV6公共DNS（2400:3200::1或2400:3200:baba::1）返回的，则说明配置成功。&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346312952.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346326433.png&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dnsdiv&quot; id=&quot;dns2&quot; style=&quot;padding-top: 50px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;div class=&quot;dns_p&quot; style=&quot;border-left: 3px solid rgb(0, 136, 255); padding-left: 10px; font-size: 20px;&quot;&gt;Windows 8配置&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;1.打开Windows 8系统控制面板，点击右上角的以图标方式显示，点击“网络和共享中心”选项。&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346375909.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;2.点击网络和共享中心左侧的“更改适配器设置”链接，如下图：&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346358870.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;3.选中正在联网的网络连接，此处教程中的操作过程是：鼠标右键菜单里选择“属性”&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346326780.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;4.针对IPv4和IPv6的操作稍有不同，请注意您的配置是针对哪一种。&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——在网络连接属性窗口中选中“Internet 协议版本 4 (TCP/IPv4)”，然后点击“属性”。&lt;br/&gt;IPv6——在网络连接属性窗口中选中“Internet 协议版本 6 (TCP/IPv6)”，然后点击“属性”。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346365345.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;5.针对IPv4和IPv6的操作稍有不同，请注意您的配置是针对哪一种。&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——选择使用指定的DNS，在DNS服务器地址中输入223.5.5.5 和 223.6.6.6，输入后确定退出即设置完成。&lt;br/&gt;IPv6——选择使用指定的DNS，在DNS服务器地址中输入2400:3200::1 和 2400:3200:baba::1，输入后确定退出即设置完成。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346311885.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346320178.jpeg&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;6.验证，打开CMD命令提示符，通过nslookup alidns.com 命令进行验证，若最终解析结果是配置的IPV4公共DNS（223.5.5.5或223.6.6.6）或IPV6公共DNS（2400:3200::1或2400:3200:baba::1）返回的，则说明配置成功。&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346312952.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031743172461346326433.png&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dnsdiv&quot; id=&quot;dns3&quot; style=&quot;padding-top: 50px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;div class=&quot;dns_p&quot; style=&quot;border-left: 3px solid rgb(0, 136, 255); padding-left: 10px; font-size: 20px;&quot;&gt;Windows 7配置&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;1.通过单击「开始」按钮，然后单击“控制面板”，打开“网络连接”。 在搜索框中，键入适配器，然后在“网络和共享中心”下，单击“查看网络连接”&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;2.右键单击要更改的连接，然后单击“属性”。 需要管理员权限 如果系统提示您输入管理员密码或进行确认，请键入该密码或提供确认&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;3.针对IPv4和IPv6的操作稍有不同，请注意您的配置是针对哪一种。&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——在网络连接属性窗口中选中“Internet 协议版本 4 (TCP/IPv4)”，然后点击“属性”。&lt;br/&gt;IPv6——在网络连接属性窗口中选中“Internet 协议版本 6 (TCP/IPv6)”，然后点击“属性”。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031744172461346432959.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;4.单击“使用下面的 DNS 服务器地址”，然后在“首选 DNS 服务器”和“备用 DNS 服务器”框中，键入主 DNS 服务器和辅助 DNS 服务器的地址。&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——选择使用指定的DNS，在DNS服务器地址中输入223.5.5.5 和 223.6.6.6，输入后确定退出即设置完成。&lt;br/&gt;IPv6——选择使用指定的DNS，在DNS服务器地址中输入2400:3200::1 和 2400:3200:baba::1，输入后确定退出即设置完成。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031744172461346442256.png&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dnsdiv&quot; id=&quot;dns4&quot; style=&quot;padding-top: 50px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;div class=&quot;dns_p&quot; style=&quot;border-left: 3px solid rgb(0, 136, 255); padding-left: 10px; font-size: 20px;&quot;&gt;Linux 系统 配置&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;1.您必须是管理员root或者具有管理员权限&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;2.输入命令&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;sudo vim /etc/resolv.conf&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;3.加入：（此处IPv4和IPv6略有不同）&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4：nameserver 223.5.5.5/nameserver 223.6.6.6&lt;br/&gt;IPv6：nameserver 2400:3200::1/nameserver 2400:3200:baba::1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;4.保存退出，然后使用dig验证&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dnsdiv&quot; id=&quot;dns5&quot; style=&quot;padding-top: 50px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;div class=&quot;dns_p&quot; style=&quot;border-left: 3px solid rgb(0, 136, 255); padding-left: 10px; font-size: 20px;&quot;&gt;Mac OS配置&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;1.选取苹果菜单&amp;gt;“系统偏好设置”&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031744172461346458156.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;2.找到网络图标，点击进入&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;http://dns.woozooo.com/images/d_18.png&quot; style=&quot;max-width: 100%; margin-bottom: 20px;&quot;/&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;3.从列表中选择想要使用的网络连接服务（例如WIFI或以太网），然后点按“高级”&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031745172461346537267.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;4.这一步，IPv4和IPv6略有不同：&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——找到DNS的标签，然后点击左下角“+”，将223.5.5.5和223.6.6.6这两个补充上去，之后点击“好”&lt;br/&gt;IPv6——找到DNS的标签，然后点击左下角“+”，将2400:3200::1和2400:3200:baba::1这两个补充上去，之后点击“好”&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031745172461346567037.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031745172461346597647.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;5.返回到上一级，点击“应用”&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031745172461346583701.png&quot;&gt;&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;6.这一步，IPv4和IPv6略有不同：&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;IPv4——在浏览器中测试打开 http://www.taobao.com 是否正常&lt;br/&gt;IPv6——验证，dig alidns.com&lt;br/&gt;若返回结果的server为阿里公共DNS（2400:3200::1或2400:3200:baba::1）则配置成功。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031746172461346683067.png&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dnsdiv&quot; id=&quot;dns6&quot; style=&quot;padding-top: 50px; color: rgb(51, 51, 51); font-family: Arial, 微软雅黑, sans-serif; font-size: medium; letter-spacing: 1px; white-space: normal;&quot;&gt;&lt;div class=&quot;dns_p&quot; style=&quot;border-left: 3px solid rgb(0, 136, 255); padding-left: 10px; font-size: 20px;&quot;&gt;Android配置&lt;/div&gt;&lt;div class=&quot;dns_p2&quot; style=&quot;padding: 20px 0px;&quot;&gt;不同手机可能设置不同，但是都大同小异&lt;div class=&quot;dns_p3&quot; style=&quot;background: rgb(238, 238, 238); padding: 10px; border-radius: 3px; margin-top: 15px;&quot;&gt;dns.alidns.com&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;dns_img&quot;&gt;&lt;img src=&quot;https://cdn.homeh.cc/upload/2024/08/20240826031746172461346699932.png&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 26 Aug 2024 02:15:03 +0800</pubDate></item><item><title>zblog 设置上传目录</title><link>https://www.homeh.cc/post/159.html</link><description>&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://cdn.homeh.cc/upload/2024/06/202406131718212003464434.jpg&quot; title=&quot;123(1)(1).jpg&quot; alt=&quot;123(1)(1).jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;1\修改upload类文件&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;2\bt 中设置跨站限制文件&amp;nbsp;.user.ini&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-php&quot;&gt;&amp;lt;?php

if&amp;nbsp;(!defined(&amp;#39;ZBP_PATH&amp;#39;))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit(&amp;#39;Access&amp;nbsp;denied&amp;#39;);
}

/**
&amp;nbsp;*&amp;nbsp;上传类.
&amp;nbsp;*
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;string&amp;nbsp;Name
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;string&amp;nbsp;FullFile
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;string&amp;nbsp;Size
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;string&amp;nbsp;Dir
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;int&amp;nbsp;PostTime
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;int|string&amp;nbsp;AuthorID
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;string&amp;nbsp;SourceName
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;string&amp;nbsp;MimeType
&amp;nbsp;*&amp;nbsp;@property&amp;nbsp;Member&amp;nbsp;Author
&amp;nbsp;*/
abstract&amp;nbsp;class&amp;nbsp;Base__Upload&amp;nbsp;extends&amp;nbsp;Base
{

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;__construct()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;global&amp;nbsp;$zbp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::__construct($zbp-&amp;gt;table[&amp;#39;Upload&amp;#39;],&amp;nbsp;$zbp-&amp;gt;datainfo[&amp;#39;Upload&amp;#39;],&amp;nbsp;__CLASS__);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;gt;PostTime&amp;nbsp;=&amp;nbsp;time();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;string&amp;nbsp;$extList
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;bool
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;CheckExtName($extList&amp;nbsp;=&amp;nbsp;&amp;#39;&amp;#39;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;global&amp;nbsp;$zbp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fn&amp;nbsp;=&amp;nbsp;$this-&amp;gt;Name;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(stripos($fn,&amp;nbsp;&amp;#39;.htaccess&amp;#39;)&amp;nbsp;!==&amp;nbsp;false)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(stripos($fn,&amp;nbsp;&amp;#39;web.config&amp;#39;)&amp;nbsp;!==&amp;nbsp;false)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$e&amp;nbsp;=&amp;nbsp;GetFileExt($this-&amp;gt;Name);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$extList&amp;nbsp;=&amp;nbsp;strtolower($extList);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;无论如何，禁止.php、.php5之类的文件的上传
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(preg_match(&amp;#39;/php/i&amp;#39;,&amp;nbsp;$e))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(preg_match(&amp;#39;/pht(ml)?(\d*)|phar/i&amp;#39;,&amp;nbsp;$e))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(trim($extList)&amp;nbsp;==&amp;nbsp;&amp;#39;&amp;#39;)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$extList&amp;nbsp;=&amp;nbsp;$zbp-&amp;gt;option[&amp;#39;ZC_UPLOAD_FILETYPE&amp;#39;];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;HasNameInString($extList,&amp;nbsp;$e);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;bool
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;CheckSize()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;global&amp;nbsp;$zbp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$n&amp;nbsp;=&amp;nbsp;(1024&amp;nbsp;*&amp;nbsp;1024&amp;nbsp;*&amp;nbsp;(int)&amp;nbsp;$zbp-&amp;gt;option[&amp;#39;ZC_UPLOAD_FILESIZE&amp;#39;]);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$n&amp;nbsp;&amp;gt;=&amp;nbsp;$this-&amp;gt;Size;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;bool
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;DelFile()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_DelFile&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpreturn&amp;nbsp;=&amp;nbsp;$fpname($this);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($fpsignal&amp;nbsp;==&amp;nbsp;PLUGIN_EXITSIGNAL_RETURN)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpsignal&amp;nbsp;=&amp;nbsp;PLUGIN_EXITSIGNAL_NONE;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$fpreturn;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(file_exists($this-&amp;gt;FullFile))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@unlink($this-&amp;gt;FullFile);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$tmp
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;bool
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;SaveFile($tmp)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;global&amp;nbsp;$zbp;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_SaveFile&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpreturn&amp;nbsp;=&amp;nbsp;$fpname($tmp,&amp;nbsp;$this);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($fpsignal&amp;nbsp;==&amp;nbsp;PLUGIN_EXITSIGNAL_RETURN)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpsignal&amp;nbsp;=&amp;nbsp;PLUGIN_EXITSIGNAL_NONE;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$fpreturn;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(!file_exists(&amp;#39;/www/cdn_homeh_cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@mkdir(&amp;#39;/www/cdn_homeh_cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir,&amp;nbsp;0755,&amp;nbsp;true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(PHP_SYSTEM&amp;nbsp;===&amp;nbsp;SYSTEM_WINDOWS)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fn&amp;nbsp;=&amp;nbsp;iconv(&amp;quot;UTF-8&amp;quot;,&amp;nbsp;$zbp-&amp;gt;lang[&amp;#39;windows_character_set&amp;#39;]&amp;nbsp;.&amp;nbsp;&amp;quot;//IGNORE&amp;quot;,&amp;nbsp;$this-&amp;gt;Name);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fn&amp;nbsp;=&amp;nbsp;$this-&amp;gt;Name;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($this-&amp;gt;CheckExtName())&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@move_uploaded_file($tmp,&amp;nbsp;&amp;#39;/www/cdn_homeh_cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir&amp;nbsp;.&amp;nbsp;$fn);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$str64
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;bool
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;SaveBase64File($str64)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;global&amp;nbsp;$zbp;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_SaveBase64File&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpreturn&amp;nbsp;=&amp;nbsp;$fpname($str64,&amp;nbsp;$this);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($fpsignal&amp;nbsp;==&amp;nbsp;PLUGIN_EXITSIGNAL_RETURN)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpsignal&amp;nbsp;=&amp;nbsp;PLUGIN_EXITSIGNAL_NONE;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$fpreturn;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(!file_exists(&amp;#39;/www/cdn_homeh_cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@mkdir(&amp;#39;/www/cdn_homeh_cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir,&amp;nbsp;0755,&amp;nbsp;true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$s&amp;nbsp;=&amp;nbsp;base64_decode($str64);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;gt;Size&amp;nbsp;=&amp;nbsp;strlen($s);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(PHP_SYSTEM&amp;nbsp;===&amp;nbsp;SYSTEM_WINDOWS)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fn&amp;nbsp;=&amp;nbsp;iconv(&amp;quot;UTF-8&amp;quot;,&amp;nbsp;&amp;quot;GBK//IGNORE&amp;quot;,&amp;nbsp;$this-&amp;gt;Name);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fn&amp;nbsp;=&amp;nbsp;$this-&amp;gt;Name;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($this-&amp;gt;CheckExtName())&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file_put_contents(&amp;#39;/www/cdn_homeh_cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir&amp;nbsp;.&amp;nbsp;$fn,&amp;nbsp;$s);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;string&amp;nbsp;$s
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;bool|string
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;Time($s&amp;nbsp;=&amp;nbsp;&amp;#39;Y-m-d&amp;nbsp;H:i:s&amp;#39;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;date($s,&amp;nbsp;$this-&amp;gt;PostTime);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$value
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;__set($name,&amp;nbsp;$value)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(in_array($name,&amp;nbsp;array(&amp;#39;Url&amp;#39;,&amp;nbsp;&amp;#39;Dir&amp;#39;,&amp;nbsp;&amp;#39;FullFile&amp;#39;,&amp;nbsp;&amp;#39;Author&amp;#39;)))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_Set&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpname($this,&amp;nbsp;$name,&amp;nbsp;$value);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::__set($name,&amp;nbsp;$value);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;$name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;Member|mixed|string
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;__get($name)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;global&amp;nbsp;$zbp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//注：这里原先设计失误，没有判断接口函数返回值就直接return，造成了插件必须自己拼接所有的url，不管接管还是不接管
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//1.7.3后修改为先判断null，如果返回null就交给下一棒直到返回系统默认值
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Filter_Plugin_Upload_Url和Filter_Plugin_Upload_Dir都做了同样的修复
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($name&amp;nbsp;==&amp;nbsp;&amp;#39;Url&amp;#39;)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_Url&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$furl&amp;nbsp;=&amp;nbsp;$fpname($this);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(!empty($furl))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$furl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;&amp;#39;https://cdn.homeh.cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir&amp;nbsp;.&amp;nbsp;rawurlencode($this-&amp;gt;Name);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($name&amp;nbsp;==&amp;nbsp;&amp;#39;Dir&amp;#39;)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_Dir&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fdir&amp;nbsp;=&amp;nbsp;$fpname($this);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(!empty($fdir))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$fdir;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$dir&amp;nbsp;=&amp;nbsp;&amp;#39;upload/&amp;#39;&amp;nbsp;.&amp;nbsp;date(&amp;#39;Y&amp;#39;,&amp;nbsp;$this-&amp;gt;PostTime)&amp;nbsp;.&amp;nbsp;&amp;#39;/&amp;#39;&amp;nbsp;.&amp;nbsp;date(&amp;#39;m&amp;#39;,&amp;nbsp;$this-&amp;gt;PostTime)&amp;nbsp;.&amp;nbsp;&amp;#39;/&amp;#39;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($zbp-&amp;gt;option[&amp;#39;ZC_UPLOAD_DIR_YEARMONTHDAY&amp;#39;])&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$dir&amp;nbsp;.=&amp;nbsp;date(&amp;#39;d&amp;#39;,&amp;nbsp;$this-&amp;gt;PostTime)&amp;nbsp;.&amp;nbsp;&amp;#39;/&amp;#39;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$dir;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($name&amp;nbsp;==&amp;nbsp;&amp;#39;FullFile&amp;#39;)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;&amp;#39;/www/cdn_homeh_cc/&amp;#39;&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Dir&amp;nbsp;.&amp;nbsp;$this-&amp;gt;Name;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($name&amp;nbsp;==&amp;nbsp;&amp;#39;Author&amp;#39;)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$zbp-&amp;gt;GetMemberByID($this-&amp;gt;AuthorID);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_Get&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpreturn&amp;nbsp;=&amp;nbsp;$fpname($this,&amp;nbsp;$name);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($fpsignal&amp;nbsp;==&amp;nbsp;PLUGIN_EXITSIGNAL_RETURN)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpsignal&amp;nbsp;=&amp;nbsp;PLUGIN_EXITSIGNAL_NONE;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$fpreturn;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;parent::__get($name);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;bool
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;Del()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;($GLOBALS[&amp;#39;hooks&amp;#39;][&amp;#39;Filter_Plugin_Upload_Del&amp;#39;]&amp;nbsp;as&amp;nbsp;$fpname&amp;nbsp;=&amp;gt;&amp;nbsp;&amp;amp;$fpsignal)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpreturn&amp;nbsp;=&amp;nbsp;$fpname($this);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($fpsignal&amp;nbsp;==&amp;nbsp;PLUGIN_EXITSIGNAL_RETURN)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fpsignal&amp;nbsp;=&amp;nbsp;PLUGIN_EXITSIGNAL_NONE;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$fpreturn;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;parent::Del();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;获取该附件图片缩略图.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;integer&amp;nbsp;$width
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;integer&amp;nbsp;$height
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;boolean&amp;nbsp;$clip
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;string|null
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;function&amp;nbsp;Thumb($width&amp;nbsp;=&amp;nbsp;200,&amp;nbsp;$height&amp;nbsp;=&amp;nbsp;150,&amp;nbsp;$clip&amp;nbsp;=&amp;nbsp;true)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(strpos($this-&amp;gt;MimeType,&amp;nbsp;&amp;#39;image&amp;#39;)&amp;nbsp;===&amp;nbsp;false)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;null;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$thumbs&amp;nbsp;=&amp;nbsp;Thumb::Thumbs(array($this-&amp;gt;Url),&amp;nbsp;$width,&amp;nbsp;$height,&amp;nbsp;1,&amp;nbsp;$clip);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;isset($thumbs[0])&amp;nbsp;?&amp;nbsp;$thumbs[0]&amp;nbsp;:&amp;nbsp;null;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

}&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 12 Jun 2024 22:45:07 +0800</pubDate></item><item><title>TimThumb——超好用的 PHP 略缩图裁剪插件</title><link>https://www.homeh.cc/post/158.html</link><description>&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;TimThumb 是一个非常简洁方便的、用于裁图的 PHP 程序。只要给它设置一些参数，它就可以生成指定图片的缩略图甚至是直接给指定的网站截图。现在很多 WordPress 主题中，都使用的是 TimThumb 这个 PHP 类库进行缩略图处理。(本博客使用的 Nana 主题中的文章略缩图也是用 TimThumb 处理的)&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;TimThumb 的使用方法&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;最简单的使用方法如下：&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;最简单的使用方法如下：&lt;/p&gt;&lt;div class=&quot;cnblogs_code&quot; style=&quot;margin: 5px 0px; padding: 5px; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); overflow: auto; white-space: normal; font-family: &amp;quot;Courier New&amp;quot; !important; font-size: 12px !important;&quot;&gt;&lt;pre style=&quot;margin-top: 0px; margin-bottom: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, serif; overflow-wrap: break-word;&quot;&gt;http://你的网址/timthumb.php?src=图片绝对地址&amp;amp;w=裁剪后宽度&amp;amp;h=裁剪后高度&amp;amp;q=生成图片的质量&amp;amp;ct=如果是png图片裁剪后是否透明&lt;/pre&gt;&lt;/div&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 0px; margin-bottom: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, serif; overflow-wrap: break-word;&quot;&gt;由上述请求示例可以看出它的参数都是用&amp;nbsp;GET&amp;nbsp;方法提交的，可选参数和说明如下：&lt;/pre&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;src 需要进行图片缩放的源图片地址，或者是需要进行截图操作的网页地址&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;webshot 如果此值为真则进行截图操作&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;w 生成图片的宽度，如果宽度或高度只设置了一个值，则根据其中一个值进行等比缩放&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;h 生成图片的高度，如果高度和宽度都没有指定，则默认为100*100&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;zc 生成图片的缩放模式，可选值 0, 1, 2, 3, 默认为1&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;0：根据传入的值进行缩放（不裁剪）， 1：以最合适的比例裁剪和调整大小（裁剪）， 2：按比例调整大小，并添加边框（裁剪），2：按比例调整大小，不添加边框（裁剪）&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;q 生成图片的质量，默认90&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;a 超出部分的裁剪位置，和缩放模式有关，可选值t (顶部), b (底部), l (左边), r (右边), 默认为从顶部裁剪&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;f 需要对生成后的图片使用一些过滤器的话，则在这里传不同过滤器的代码和值&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;s 是否对生产的图片进行锐化处理&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;cc 生成图片的背景画布颜色&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;ct 生成png图片时背景是否透明&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;注意事项&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;1、使用此插件需要服务器支持 GD 库（现在一般的主机都支持）；&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;2、使用时要在 TimThumb.php 的同一个目录下新建一个 cache 文件夹（用来存储生成的小图片），并且设置 cache 文件夹为可写(755 或 777 权限)；&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; font-family: &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(238, 238, 238);&quot;&gt;3、程序为了安全考虑，默认不支持裁剪站外的图片。如果需要开启裁剪站外图片功能，可以在第 132 行左右的 “$ALLOWED_SITES” 数组中添加对应的网址为白名单&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://cdn.homeh.cc/upload/2024/06/202406121718203465778019.png&quot; title=&quot;222.png&quot; alt=&quot;222.png&quot;/&gt;&lt;/p&gt;</description><pubDate>Wed, 12 Jun 2024 21:13:43 +0800</pubDate></item><item><title>timthumb.php支持WordPress多站点教程</title><link>https://www.homeh.cc/post/157.html</link><description>&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;在使用wordpress主题的时候，因为timthumb基于安全问题，除了支持指定的几个网站的外链图片外，不支持其它任何外链图片；另一方面则是因为对本机图片地址的处理导致。解决的方法很简单，仅需要增加支持的外链&lt;a href=&quot;https://www.8a.hk/host&quot; target=&quot;_self&quot; style=&quot;margin: 0px; padding: 0px; box-sizing: border-box; list-style: none; outline: 0px; text-decoration-line: none; color: rgb(102, 102, 102); -webkit-tap-highlight-color: transparent;&quot;&gt;域名&lt;/a&gt;，和修改对机图片处理的代码即可。解决方式如下：&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;1、编辑timthumb.php文件，找到以下代码（大概131行）&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;if(! isset($ALLOWED_SITES)){&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; $ALLOWED_SITES = array (&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;flickr.com&amp;#39;,&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;staticflickr.com&amp;#39;,&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;picasa.com&amp;#39;,&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;img.youtube.com&amp;#39;,&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;upload.wikimedia.org&amp;#39;,&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;photobucket.com&amp;#39;,&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;www.8a.cn&amp;#39;, //新增加的域名&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; );&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;}&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;添加到您的域名到里面去即可。&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;2、在timthumb.php文件，找到以下代码（大概216行）：&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;$this-&amp;gt;src = preg_replace(&amp;#39;/https?:\/\/(?:www\.)?&amp;#39; . $this-&amp;gt;myHost . &amp;#39;/i&amp;#39;, &amp;#39;&amp;#39;, $this-&amp;gt;src);&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;把该行代码删除或注释掉即可。提示：这行代码的意思是“如果图片地址是本机的，则删除图片url中本机的域名部分”。&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;3、完成上面的操作，保存后，重新刷新网站页面图片就会显示了。&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div microsoft=&quot;&quot; yahei=&quot;&quot;&gt;4、如果图裂了，请检测文件权限是否是755。&lt;/div&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 0px; padding: 0px; box-sizing: border-box; list-style: none;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px; box-sizing: border-box; list-style: none; color: rgb(102, 102, 102); font-family: &amp;quot;Microsoft Yahei&amp;quot;; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 12 Jun 2024 20:11:26 +0800</pubDate></item></channel></rss>