当前位置:首页 > 文章列表 > 文章 > php教程 > PHP生成动态RSS教程详解

PHP生成动态RSS教程详解

2025-11-18 08:25:40 0浏览 收藏

有志者,事竟成!如果你在学习文章,那么本文《PHP动态网页RSS生成教程》,就很适合你!文章讲解的知识点主要包括,若是你对本文感兴趣,或者是想搞懂其中某个知识点,就请你继续往下看吧~

PHP生成RSS订阅源的核心技术栈包括:PHP语言处理动态内容,MySQL获取文章数据,DOMDocument构建符合RSS 2.0规范的XML结构,设置application/rss+xml头输出,并用htmlspecialchars确保内容安全。

PHP动态网页RSS订阅生成_PHP动态网页RSSfeed订阅源创建指南

在PHP动态网页中生成RSS订阅源,核心在于将数据库或其他动态内容以XML格式封装,并遵循RSS规范输出,让用户可以通过订阅器实时获取网站更新。这听起来可能有点技术性,但说白了,就是把你的最新内容整理成一种特定的格式,方便大家订阅。

要实现PHP动态网页的RSS订阅源创建,我们通常需要经历几个关键步骤。在我看来,这不仅仅是技术上的堆砌,更是一种内容分发的思考。

你需要从你的数据源(比如MySQL数据库)中获取最新、最相关的内容。这通常是文章标题、链接、摘要、发布日期等。一个高效的数据库查询是基础,确保你只获取到需要展示在RSS中的数据,并且是按时间倒序排列的。

接下来,就是构建XML文档了。PHP提供了像DOMDocument这样的强大工具来处理XML,我个人更偏爱它,因为它能让你以面向对象的方式构建复杂的XML结构,错误处理也相对友好。当然,如果你只是生成一个非常简单的RSS,直接拼接字符串也未尝不可,但维护起来可能会比较麻烦。

RSS 2.0规范是我们需要严格遵循的。一个标准的RSS文件,最外层是标签,里面包含一个,而里则包含了整个订阅源的元信息(如标题、链接、描述)以及一系列的标签,每个就代表你的一篇文章或一个更新。每个至少要有</code>、<code><link></code>和<code><description></code>,发布日期<code><pubDate></code>也是非常关键的。</p><p>在PHP代码中,你会这样做:</p><ol><li><strong>设置HTTP头:</strong> 这是非常重要的一步,告诉浏览器或订阅器你输出的是XML内容。通常是<code>header('Content-Type: application/rss+xml; charset=UTF-8');</code>。</li><li><strong>创建DOMDocument对象:</strong> <code>$dom = new DOMDocument('1.0', 'UTF-8');</code>。</li><li><strong>构建根元素和频道:</strong> 创建<code><rss></code>和<code><channel></code>元素,并设置它们的属性和子元素,比如<code><title></code>、<code><link></code>、<code><description></code>。</li><li><strong>遍历数据并创建item:</strong> 循环你从数据库获取的数据,为每一条记录创建一个<code><item></code>元素,并填充其子元素,如文章标题、链接、发布日期等。特别注意日期格式,RSS通常要求RFC 822格式。</li><li><strong>输出XML:</strong> 最后,使用<code>$dom->saveXML();</code>方法将构建好的XML输出到浏览器。</li></ol><p>这里是一个简化的PHP代码示例,它展示了核心逻辑:</p><pre class="brush:language-php;toolbar:false;"><?php header('Content-Type: application/rss+xml; charset=UTF-8'); // 模拟从数据库获取数据 function getLatestArticles() { // 实际应用中这里会是数据库查询,例如: // $pdo = new PDO('mysql:host=localhost;dbname=yourdb', 'user', 'password'); // $stmt = $pdo->query("SELECT title, link, description, pub_date FROM articles ORDER BY pub_date DESC LIMIT 10"); // return $stmt->fetchAll(PDO::FETCH_ASSOC); return [ [ 'title' => '我的第一篇PHP RSS指南', 'link' => 'https://example.com/article/1', 'description' => '这篇指南详细介绍了如何用PHP创建RSS订阅源。', 'pubDate' => time() - 3600 * 24 * 2, // 2天前 ], [ 'title' => '深入理解RSS 2.0规范', 'link' => 'https://example.com/article/2', 'description' => '了解RSS的各个标签和它们的作用,确保你的订阅源符合标准。', 'pubDate' => time() - 3600 * 24, // 1天前 ], [ 'title' => '优化PHP RSS订阅源的性能', 'link' => 'https://example.com/article/3', 'description' => '缓存和数据库优化是提升RSS订阅源性能的关键。', 'pubDate' => time(), // 现在 ], ]; } $articles = getLatestArticles(); $dom = new DOMDocument('1.0', 'UTF-8'); $dom->formatOutput = true; // 让输出的XML更易读 $rss = $dom->createElement('rss'); $rss->setAttribute('version', '2.0'); $dom->appendChild($rss); $channel = $dom->createElement('channel'); $rss->appendChild($channel); // 频道信息 $channel->appendChild($dom->createElement('title', '我的网站最新更新')); $channel->appendChild($dom->createElement('link', 'https://example.com/')); $channel->appendChild($dom->createElement('description', '这里是我的网站最新的文章和动态。')); $channel->appendChild($dom->createElement('language', 'zh-cn')); // 频道发布日期取最新文章的日期,如果文章为空则取当前时间 $latestPubDate = !empty($articles) ? max(array_column($articles, 'pubDate')) : time(); $channel->appendChild($dom->createElement('pubDate', date(DATE_RSS, $latestPubDate))); // 添加文章项目 foreach ($articles as $article) { $item = $dom->createElement('item'); $channel->appendChild($item); $item->appendChild($dom->createElement('title', htmlspecialchars($article['title'], ENT_XML1 | ENT_QUOTES, 'UTF-8'))); $item->appendChild($dom->createElement('link', htmlspecialchars($article['link'], ENT_XML1 | ENT_QUOTES, 'UTF-8'))); $item->appendChild($dom->createElement('description', htmlspecialchars($article['description'], ENT_XML1 | ENT_QUOTES, 'UTF-8'))); $item->appendChild($dom->createElement('pubDate', date(DATE_RSS, $article['pubDate']))); // 更多可选标签如 <author>, <guid> 等可以根据需要添加 } echo $dom->saveXML(); ?></pre><p>这个示例只是一个骨架,实际项目中,你可能还需要处理更复杂的HTML内容(CDATA包裹)、图片、分类等。但核心思路,我认为,就是将动态数据“翻译”成XML语言,并让订阅器能“听懂”。</p><h3>PHP生成RSS订阅源需要哪些核心技术栈?</h3><p>要说PHP生成RSS订阅源的核心技术栈,其实并不复杂,主要围绕PHP语言本身和一些基础的网络与数据处理知识展开。在我看来,它更像是一项“集成”而非“发明”的工作。</p><p>首先,<strong>PHP语言</strong>是毋庸置疑的核心。你需要对PHP的基本语法、文件操作(如果</p><p>今天关于《PHP生成动态RSS教程详解》的内容就介绍到这里了,是不是学起来一目了然!想要了解更多关于php,rss,动态网页,DOMDocument,RSS2.0规范的内容请关注golang学习网公众号!</p> </div> <div class="labsList"> <a href="javascript:;" title="php">php</a> <a href="javascript:;" title="rss">rss</a> <a href="javascript:;" title="动态网页">动态网页</a> <a href="javascript:;" title="DOMDocument">DOMDocument</a> <a href="javascript:;" title="RSS2.0规范">RSS2.0规范</a> </div> <div class="cateBox"> <div class="cateItem"> <a href="/article/388438.html" title="B站看漫画方法详解" class="img_box"> <img src="/uploads/20251118/1763425531691bbcfb0ea1e.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="B站看漫画方法详解">B站看漫画方法详解 </a> <dl> <dt class="lineOverflow"><a href="/article/388438.html" title="B站看漫画方法详解" class="aBlack">上一篇<i></i></a></dt> <dd class="lineTwoOverflow">B站看漫画方法详解</dd> </dl> </div> <div class="cateItem"> <a href="/article/388440.html" title="Win11存储感知无法清理解决方法" class="img_box"> <img src="/uploads/20251118/1763425588691bbd34ee13c.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="Win11存储感知无法清理解决方法"> </a> <dl> <dt class="lineOverflow"><a href="/article/388440.html" class="aBlack" title="Win11存储感知无法清理解决方法">下一篇<i></i></a></dt> <dd class="lineTwoOverflow">Win11存储感知无法清理解决方法</dd> </dl> </div> </div> </div> </div> <div class="leftContBox pt0"> <div class="pdl20"> <div class="contTit"> <a href="/articlelist.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit">最新文章</div> </div> </div> <ul class="newArticleList"> <li> <div class="contBox"> <a href="/article/621130.html" class="img_box" title="PHP preg_replace_callback_array 怎么按规则顺序处理 Markdown 标记:避免嵌套替换和回调串线"> <img src="/uploads/20260819/1787119476-php-markdown-protect.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP preg_replace_callback_array 怎么按规则顺序处理 Markdown 标记:避免嵌套替换和回调串线"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  7小时前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/621130.html" class="aBlack" target="_blank" title="PHP preg_replace_callback_array 怎么按规则顺序处理 Markdown 标记:避免嵌套替换和回调串线">PHP preg_replace_callback_array 怎么按规则顺序处理 Markdown 标记:避免嵌套替换和回调串线</a> </dt> <dd class="cont2"> <span><i class="view"></i>492浏览</span> <span class="collectBtn user_collection" data-id="621130" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621117.html" class="img_box" title="PHP 8.4 非对称可见性 public private(set):只读接口与内部写入怎么拆"> <img src="/uploads/20260818/1787055152-php-asymmetric-contracts-v2.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.4 非对称可见性 public private(set):只读接口与内部写入怎么拆"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/621117.html" class="aBlack" target="_blank" title="PHP 8.4 非对称可见性 public private(set):只读接口与内部写入怎么拆">PHP 8.4 非对称可见性 public private(set):只读接口与内部写入怎么拆</a> </dt> <dd class="cont2"> <span><i class="view"></i>257浏览</span> <span class="collectBtn user_collection" data-id="621117" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621107.html" class="img_box" title="PHP 8.4 mb_trim 怎么清理中文空白:全角空格、字符掩码与兼容回退"> <img src="/uploads/20260818/1787042837-mb-trim-compatibility-path.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.4 mb_trim 怎么清理中文空白:全角空格、字符掩码与兼容回退"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/55_new_0_1.html" class="aLightGray" title="字符串">字符串</a> · <a href="/articletag/4712_new_0_1.html" class="aLightGray" title="utf-8">utf-8</a> · <a href="/articletag/39782_new_0_1.html" class="aLightGray" title="php教程">php教程</a> · <a href="/articletag/40308_new_0_1.html" class="aLightGray" title="PHP 8.4">PHP 8.4</a> · <a href="/articletag/40643_new_0_1.html" class="aLightGray" title="兼容改造">兼容改造</a> · <a href="javascript:;" class="aLightGray" title="多字节字符串">多字节字符串</a> <a href="javascript:;" class="aLightGray" title="PHP 8.4">PHP 8.4</a> <a href="javascript:;" class="aLightGray" title="mb_trim">mb_trim</a> <a href="javascript:;" class="aLightGray" title="mb_ltrim">mb_ltrim</a> <a href="javascript:;" class="aLightGray" title="mb_rtrim">mb_rtrim</a> <a href="javascript:;" class="aLightGray" title="全角空格">全角空格</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621107.html" class="aBlack" target="_blank" title="PHP 8.4 mb_trim 怎么清理中文空白:全角空格、字符掩码与兼容回退">PHP 8.4 mb_trim 怎么清理中文空白:全角空格、字符掩码与兼容回退</a> </dt> <dd class="cont2"> <span><i class="view"></i>440浏览</span> <span class="collectBtn user_collection" data-id="621107" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621087.html" class="img_box" title="PHP 多字节标题规范化实战:mb_ucfirst、UTF-8 与 PHP 8.3 回退"> <img src="/uploads/20260818/1787033335-mb-ucfirst-before-after.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 多字节标题规范化实战:mb_ucfirst、UTF-8 与 PHP 8.3 回退"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/55_new_0_1.html" class="aLightGray" title="字符串">字符串</a> · <a href="/articletag/1433_new_0_1.html" class="aLightGray" title="PHP">PHP</a> · <a href="/articletag/4712_new_0_1.html" class="aLightGray" title="utf-8">utf-8</a> · <a href="/articletag/40308_new_0_1.html" class="aLightGray" title="PHP 8.4">PHP 8.4</a> · <a href="/articletag/40643_new_0_1.html" class="aLightGray" title="兼容改造">兼容改造</a> · <a href="javascript:;" class="aLightGray" title="UTF-8">UTF-8</a> <a href="javascript:;" class="aLightGray" title="PHP 8.4">PHP 8.4</a> <a href="javascript:;" class="aLightGray" title="mb_ucfirst">mb_ucfirst</a> <a href="javascript:;" class="aLightGray" title="PHP 多字节字符串">PHP 多字节字符串</a> <a href="javascript:;" class="aLightGray" title="PHP 兼容">PHP 兼容</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621087.html" class="aBlack" target="_blank" title="PHP 多字节标题规范化实战:mb_ucfirst、UTF-8 与 PHP 8.3 回退">PHP 多字节标题规范化实战:mb_ucfirst、UTF-8 与 PHP 8.3 回退</a> </dt> <dd class="cont2"> <span><i class="view"></i>256浏览</span> <span class="collectBtn user_collection" data-id="621087" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621086.html" class="img_box" title="PHP 8.4 mb_ucfirst 怎么处理多字节标题首字母:编码、空字符串与旧版本兼容"> <img src="/uploads/20260818/1787033150-mb-ucfirst-before-after.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.4 mb_ucfirst 怎么处理多字节标题首字母:编码、空字符串与旧版本兼容"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/55_new_0_1.html" class="aLightGray" title="字符串">字符串</a> · <a href="/articletag/1433_new_0_1.html" class="aLightGray" title="PHP">PHP</a> · <a href="/articletag/4712_new_0_1.html" class="aLightGray" title="utf-8">utf-8</a> · <a href="/articletag/40308_new_0_1.html" class="aLightGray" title="PHP 8.4">PHP 8.4</a> · <a href="/articletag/40643_new_0_1.html" class="aLightGray" title="兼容改造">兼容改造</a> · <a href="javascript:;" class="aLightGray" title="UTF-8">UTF-8</a> <a href="javascript:;" class="aLightGray" title="PHP 8.4">PHP 8.4</a> <a href="javascript:;" class="aLightGray" title="mb_ucfirst">mb_ucfirst</a> <a href="javascript:;" class="aLightGray" title="PHP 多字节字符串">PHP 多字节字符串</a> <a href="javascript:;" class="aLightGray" title="PHP 兼容">PHP 兼容</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621086.html" class="aBlack" target="_blank" title="PHP 8.4 mb_ucfirst 怎么处理多字节标题首字母:编码、空字符串与旧版本兼容">PHP 8.4 mb_ucfirst 怎么处理多字节标题首字母:编码、空字符串与旧版本兼容</a> </dt> <dd class="cont2"> <span><i class="view"></i>111浏览</span> <span class="collectBtn user_collection" data-id="621086" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621075.html" class="img_box" title="PHP 8.5 get_error_handler() 怎么排查:临时错误处理器与恢复边界"> <img src="/uploads/20260818/1787027543-php85-error-handler-inspect.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.5 get_error_handler() 怎么排查:临时错误处理器与恢复边界"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/503_new_0_1.html" class="aLightGray" title="错误处理">错误处理</a> · <a href="/articletag/807_new_0_1.html" class="aLightGray" title="调试">调试</a> · <a href="/articletag/39782_new_0_1.html" class="aLightGray" title="php教程">php教程</a> · <a href="/articletag/40348_new_0_1.html" class="aLightGray" title="PHP 8.5">PHP 8.5</a> · <a href="javascript:;" class="aLightGray" title="错误处理">错误处理</a> <a href="javascript:;" class="aLightGray" title="set_error_handler">set_error_handler</a> <a href="javascript:;" class="aLightGray" title="PHP 8.5">PHP 8.5</a> <a href="javascript:;" class="aLightGray" title="get_error_handler">get_error_handler</a> <a href="javascript:;" class="aLightGray" title="restore_error_handler">restore_error_handler</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621075.html" class="aBlack" target="_blank" title="PHP 8.5 get_error_handler() 怎么排查:临时错误处理器与恢复边界">PHP 8.5 get_error_handler() 怎么排查:临时错误处理器与恢复边界</a> </dt> <dd class="cont2"> <span><i class="view"></i>284浏览</span> <span class="collectBtn user_collection" data-id="621075" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621074.html" class="img_box" title="PHP 8.5 chr() 输入越界如何改造:字节边界、编码误区与回归测试"> <img src="/uploads/20260818/1787027100-php85-chr-byte-budget.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.5 chr() 输入越界如何改造:字节边界、编码误区与回归测试"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/55_new_0_1.html" class="aLightGray" title="字符串">字符串</a> · <a href="/articletag/39782_new_0_1.html" class="aLightGray" title="php教程">php教程</a> · <a href="/articletag/39952_new_0_1.html" class="aLightGray" title="版本升级">版本升级</a> · <a href="/articletag/40348_new_0_1.html" class="aLightGray" title="PHP 8.5">PHP 8.5</a> · <a href="javascript:;" class="aLightGray" title="输入校验">输入校验</a> <a href="javascript:;" class="aLightGray" title="弃用提示">弃用提示</a> <a href="javascript:;" class="aLightGray" title="PHP 8.5">PHP 8.5</a> <a href="javascript:;" class="aLightGray" title="chr">chr</a> <a href="javascript:;" class="aLightGray" title="字节范围">字节范围</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621074.html" class="aBlack" target="_blank" title="PHP 8.5 chr() 输入越界如何改造:字节边界、编码误区与回归测试">PHP 8.5 chr() 输入越界如何改造:字节边界、编码误区与回归测试</a> </dt> <dd class="cont2"> <span><i class="view"></i>468浏览</span> <span class="collectBtn user_collection" data-id="621074" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621073.html" class="img_box" title="PHP 8.5 chr() 越界为什么提示弃用:字节输入校验与兼容改造"> <img src="/uploads/20260818/1787026652-php85-chr-byte-budget.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.5 chr() 越界为什么提示弃用:字节输入校验与兼容改造"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/55_new_0_1.html" class="aLightGray" title="字符串">字符串</a> · <a href="/articletag/39782_new_0_1.html" class="aLightGray" title="php教程">php教程</a> · <a href="/articletag/39952_new_0_1.html" class="aLightGray" title="版本升级">版本升级</a> · <a href="/articletag/40348_new_0_1.html" class="aLightGray" title="PHP 8.5">PHP 8.5</a> · <a href="javascript:;" class="aLightGray" title="输入校验">输入校验</a> <a href="javascript:;" class="aLightGray" title="弃用提示">弃用提示</a> <a href="javascript:;" class="aLightGray" title="PHP 8.5">PHP 8.5</a> <a href="javascript:;" class="aLightGray" title="chr">chr</a> <a href="javascript:;" class="aLightGray" title="字节范围">字节范围</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621073.html" class="aBlack" target="_blank" title="PHP 8.5 chr() 越界为什么提示弃用:字节输入校验与兼容改造">PHP 8.5 chr() 越界为什么提示弃用:字节输入校验与兼容改造</a> </dt> <dd class="cont2"> <span><i class="view"></i>350浏览</span> <span class="collectBtn user_collection" data-id="621073" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621053.html" class="img_box" title="PHP 8.3 json_validate 怎么用:只校验不解码、错误信息与兼容边界"> <img src="/uploads/20260818/1787016887-php-json-validate-gate.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.3 json_validate 怎么用:只校验不解码、错误信息与兼容边界"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/307_new_0_1.html" class="aLightGray" title="JSON">JSON</a> · <a href="/articletag/503_new_0_1.html" class="aLightGray" title="错误处理">错误处理</a> · <a href="/articletag/1433_new_0_1.html" class="aLightGray" title="PHP">PHP</a> · <a href="/articletag/40007_new_0_1.html" class="aLightGray" title="接口校验">接口校验</a> · <a href="/articletag/40631_new_0_1.html" class="aLightGray" title="PHP 8.3">PHP 8.3</a> · <a href="javascript:;" class="aLightGray" title="PHP升级">PHP升级</a> <a href="javascript:;" class="aLightGray" title="json_decode">json_decode</a> <a href="javascript:;" class="aLightGray" title="PHP 8.3">PHP 8.3</a> <a href="javascript:;" class="aLightGray" title="json_validate">json_validate</a> <a href="javascript:;" class="aLightGray" title="JSON校验">JSON校验</a> <a href="javascript:;" class="aLightGray" title="JSON_THROW_ON_ERROR">JSON_THROW_ON_ERROR</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621053.html" class="aBlack" target="_blank" title="PHP 8.3 json_validate 怎么用:只校验不解码、错误信息与兼容边界">PHP 8.3 json_validate 怎么用:只校验不解码、错误信息与兼容边界</a> </dt> <dd class="cont2"> <span><i class="view"></i>221浏览</span> <span class="collectBtn user_collection" data-id="621053" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621052.html" class="img_box" title="PHP 8.5 curl_share_init_persistent() 怎么复用连接:DNS、连接锁与跨请求验收"> <img src="/uploads/20260818/1787016721-acceptance-rollback.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.5 curl_share_init_persistent() 怎么复用连接:DNS、连接锁与跨请求验收"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   <a href="/articletag/729_new_0_1.html" class="aLightGray" title="性能优化">性能优化</a> · <a href="/articletag/1433_new_0_1.html" class="aLightGray" title="PHP">PHP</a> · <a href="/articletag/4705_new_0_1.html" class="aLightGray" title="curl">curl</a> · <a href="/articletag/40348_new_0_1.html" class="aLightGray" title="PHP 8.5">PHP 8.5</a> · <a href="javascript:;" class="aLightGray" title="Curl">Curl</a> <a href="javascript:;" class="aLightGray" title="DNS">DNS</a> <a href="javascript:;" class="aLightGray" title="连接复用">连接复用</a> <a href="javascript:;" class="aLightGray" title="PHP 8.5">PHP 8.5</a> <a href="javascript:;" class="aLightGray" title="curl_share_init_persistent">curl_share_init_persistent</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/621052.html" class="aBlack" target="_blank" title="PHP 8.5 curl_share_init_persistent() 怎么复用连接:DNS、连接锁与跨请求验收">PHP 8.5 curl_share_init_persistent() 怎么复用连接:DNS、连接锁与跨请求验收</a> </dt> <dd class="cont2"> <span><i class="view"></i>363浏览</span> <span class="collectBtn user_collection" data-id="621052" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621051.html" class="img_box" title="PHP 8.4 Lazy Objects 怎么用:Ghost、Proxy 与初始化边界"> <img src="/uploads/20260818/1787016692-php84-lazy-ghost-chain.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 8.4 Lazy Objects 怎么用:Ghost、Proxy 与初始化边界"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/621051.html" class="aBlack" target="_blank" title="PHP 8.4 Lazy Objects 怎么用:Ghost、Proxy 与初始化边界">PHP 8.4 Lazy Objects 怎么用:Ghost、Proxy 与初始化边界</a> </dt> <dd class="cont2"> <span><i class="view"></i>224浏览</span> <span class="collectBtn user_collection" data-id="621051" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/621050.html" class="img_box" title="PHP CLI 环境变量为何和 FPM 不一致:php.ini、pool 配置与运行时核对"> <img src="/uploads/20260818/1787016424-php-fpm-env-before-after.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP CLI 环境变量为何和 FPM 不一致:php.ini、pool 配置与运行时核对"> </a> <dl> <dd class="cont1"> <span> <a href="/articlelist/19_new_0_1.html" class="aLightGray" title="文章">文章</a> · <a href="/articlelist/84_new_0_1.html" class="aLightGray" title="php教程">php教程</a>   |  1天前  |   </span> </dd> <dt class="lineOverflow"> <a href="/article/621050.html" class="aBlack" target="_blank" title="PHP CLI 环境变量为何和 FPM 不一致:php.ini、pool 配置与运行时核对">PHP CLI 环境变量为何和 FPM 不一致:php.ini、pool 配置与运行时核对</a> </dt> <dd class="cont2"> <span><i class="view"></i>237浏览</span> <span class="collectBtn user_collection" data-id="621050" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> </ul> </div> </div> <div class="mainRight"> <!-- 右侧广告位banner --> <div class="rightContBox" style="margin-top: 0px;"> <div class="rightTit"> <a href="/courselist.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit lineOverflow">课程推荐</div> </div> <ul class="lessonRecomRList"> <li> <a href="/course/9.html" class="img_box" target="_blank" title="前端进阶之JavaScript设计模式"> <img src="/uploads/20221222/52fd0f23a454c71029c2c72d206ed815.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="前端进阶之JavaScript设计模式"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/9.html" target="_blank" class="aBlack" title="前端进阶之JavaScript设计模式">前端进阶之JavaScript设计模式</a></dt> <dd class="cont1 lineTwoOverflow"> 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。 </dd> <dd class="cont2">543次学习</dd> </dl> </li> <li> <a href="/course/2.html" class="img_box" target="_blank" title="GO语言核心编程课程"> <img src="/uploads/20221221/634ad7404159bfefc6a54a564d437b5f.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="GO语言核心编程课程"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/2.html" target="_blank" class="aBlack" title="GO语言核心编程课程">GO语言核心编程课程</a></dt> <dd class="cont1 lineTwoOverflow"> 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。 </dd> <dd class="cont2">516次学习</dd> </dl> </li> <li> <a href="/course/74.html" class="img_box" target="_blank" title="简单聊聊mysql8与网络通信"> <img src="/uploads/20240103/bad35fe14edbd214bee16f88343ac57c.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="简单聊聊mysql8与网络通信"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/74.html" target="_blank" class="aBlack" title="简单聊聊mysql8与网络通信">简单聊聊mysql8与网络通信</a></dt> <dd class="cont1 lineTwoOverflow"> 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让 </dd> <dd class="cont2">500次学习</dd> </dl> </li> <li> <a href="/course/57.html" class="img_box" target="_blank" title="JavaScript正则表达式基础与实战"> <img src="/uploads/20221226/bbe4083bb3cb0dd135fb02c31c3785fb.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="JavaScript正则表达式基础与实战"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/57.html" target="_blank" class="aBlack" title="JavaScript正则表达式基础与实战">JavaScript正则表达式基础与实战</a></dt> <dd class="cont1 lineTwoOverflow"> 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。 </dd> <dd class="cont2">487次学习</dd> </dl> </li> <li> <a href="/course/28.html" class="img_box" target="_blank" title="从零制作响应式网站—Grid布局"> <img src="/uploads/20221223/ac110f88206daeab6c0cf38ebf5fe9ed.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="从零制作响应式网站—Grid布局"> </a> <dl> <dt class="lineTwoOverflow"><a href="/course/28.html" target="_blank" class="aBlack" title="从零制作响应式网站—Grid布局">从零制作响应式网站—Grid布局</a></dt> <dd class="cont1 lineTwoOverflow"> 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。 </dd> <dd class="cont2">485次学习</dd> </dl> </li> </ul> </div> <div class="rightContBox"> <div class="rightTit"> <a href="/ai.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit lineOverflow">AI推荐</div> </div> <ul class="lessonRecomRList"> <li> <a href="/ai/13109.html" target="_blank" title="ljg-skills - "Prompt之神"李继刚开源的 AI 技能集" class="img_box"> <img src="/uploads/ai/20260616/ljg-skills-icon-8bbe1468e5.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="ljg-skills - "Prompt之神"李继刚开源的 AI 技能集" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13109.html" class="aBlack" target="_blank" title="ljg-skills">ljg-skills</a></dt> <dd class="cont1 lineTwoOverflow"> ljg-skills 是李继刚开源的 AI 技能与提示词集合,面向大模型使用者整理了一批可复用的 prompt、角色设定和任务技能模板,适合用于学习提示词设计、搭建个人 AI 工作流和沉淀团队常用智能体能力。 </dd> <dd class="cont2">4976次使用</dd> </dl> </li> <li> <a href="/ai/13108.html" target="_blank" title="MELO音乐 - AI 音乐生成平台,支持多模态创作能力" class="img_box"> <img src="/uploads/ai/20260616/melo-icon-10bf590762.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="MELO音乐 - AI 音乐生成平台,支持多模态创作能力" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13108.html" class="aBlack" target="_blank" title="MELO音乐">MELO音乐</a></dt> <dd class="cont1 lineTwoOverflow"> MELO音乐是一站式AI视频与音乐制作助手,对标suno, udio的高品质体验。提供伴奏生成、原创写词、无损导出、哼唱识曲、混音变声等全套音频与短视频编辑工具。无论是流行Kpop、电音说唱、民谣古风、摇滚儿歌还是商用轻音乐,MELO为你免费谱曲,轻松做同款! </dd> <dd class="cont2">4531次使用</dd> </dl> </li> <li> <a href="/ai/13107.html" target="_blank" title="UniScribe - AI 免费在线音视频转文字平台" class="img_box"> <img src="/uploads/ai/20260616/uniscribe-icon-3c88366a15.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="UniScribe - AI 免费在线音视频转文字平台" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13107.html" class="aBlack" target="_blank" title="UniScribe">UniScribe</a></dt> <dd class="cont1 lineTwoOverflow"> UniScribe 是一款 AI 音视频转文字与内容整理工具,支持上传音频、视频文件或粘贴 YouTube 链接,自动生成转写文本、摘要、思维导图和关键问题,并支持多格式导出,适合会议记录、课程学习、访谈整理和内容创作复盘。 </dd> <dd class="cont2">4481次使用</dd> </dl> </li> <li> <a href="/ai/13106.html" target="_blank" title="剧云 - 免费 AI 智能中文剧本创作平台" class="img_box"> <img src="/uploads/ai/20260615/d36c7176-icon-2b0cd581ce.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="剧云 - 免费 AI 智能中文剧本创作平台" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13106.html" class="aBlack" target="_blank" title="剧云">剧云</a></dt> <dd class="cont1 lineTwoOverflow"> 剧云是专业中文剧本创作平台,安全稳定运行十余年,集成AI编剧、剧本医生审核、人物小传、剧情关系图、大纲编写、多人协作、Word导入导出、版权管控功能,数据安全防护,轻松高效创作剧本。 </dd> <dd class="cont2">4734次使用</dd> </dl> </li> <li> <a href="/ai/13105.html" target="_blank" title="万象有声 - AI 一站式有声内容创作平台" class="img_box"> <img src="/uploads/ai/20260615/50267bac-icon-c146b001b5.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="万象有声 - AI 一站式有声内容创作平台" style="object-fit:cover;width:100%;height:100%;"> </a> <dl> <dt class="lineTwoOverflow"><a href="/ai/13105.html" class="aBlack" target="_blank" title="万象有声">万象有声</a></dt> <dd class="cont1 lineTwoOverflow"> 万象有声,一个专为有声创作者打造的新一代智能有声内容创作平台。平台提供专业的智能拆章、智能画本编辑、AI配音、AI生成音效、后期制作、智能对轨、智能审听等有声创作全流程工具,可以帮助创作者高效、低成本创作出引人入胜的有声作品。立即体验,让有声书制作更简单! </dd> <dd class="cont2">4675次使用</dd> </dl> </li> </ul> </div> <!-- 相关文章 --> <div class="rightContBox"> <div class="rightTit"> <a href="/articlelist.html" class="more" title="查看更多">查看更多<i class="iconfont"></i></a> <div class="tit lineOverflow">相关文章</div> </div> <ul class="aboutArticleRList"> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/620983.html" class="aBlack" title="PHP 8.5 array_last() 怎么处理空数组:从 null 结果到兼容旧版本的 Polyfill">PHP 8.5 array_last() 怎么处理空数组:从 null 结果到兼容旧版本的 Polyfill</a></dt> <dd> <span class="left">2026-08-16</span> <span class="right">501浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/616777.html" class="aBlack" title="宝塔配置Ruby环境:RVM+Nginx反代教程">宝塔配置Ruby环境:RVM+Nginx反代教程</a></dt> <dd> <span class="left">2026-05-29</span> <span class="right">501浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/616127.html" class="aBlack" title="unset函数作用范围详解">unset函数作用范围详解</a></dt> <dd> <span class="left">2026-05-29</span> <span class="right">501浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/598283.html" class="aBlack" title="VS Code配置Xdebug教程:PHP调试技巧全解析">VS Code配置Xdebug教程:PHP调试技巧全解析</a></dt> <dd> <span class="left">2026-05-13</span> <span class="right">501浏览</span> </dd> </dl> </li> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/591780.html" class="aBlack" title="PHPEnv安装PhpMyAdmin教程详解">PHPEnv安装PhpMyAdmin教程详解</a></dt> <dd> <span class="left">2026-05-07</span> <span class="right">501浏览</span> </dd> </dl> </li> </ul> </div> </div> </div> <div class="footer"> <div class="footerIn"> <div class="footLeft"> <div class="linkBox"> <a href="/about/1.html" target="_blank" class="aBlack" title="关于我们">关于我们</a> <a href="/about/5.html" target="_blank" class="aBlack" title="免责声明">免责声明</a> <a href="#" class="aBlack" title="意见反馈">意见反馈</a> <a href="/about/2.html" class="aBlack" target="_blank" title="联系我们">联系我们</a> <a href="/send.html" class="aBlack" title="广告合作">内容提交</a> <a href="/manual/go/" target="_blank" class="aBlack" title="手册">手册</a> </div> <div class="footTip">Golang学习网:公益在线Go学习平台,帮助Go学习者快速成长!</div> <div class="shareBox"> <span><i class="qq"></i>技术交流群</span> </div> <div class="copyRight"> Copyright 2023 http://www.17golang.com/ All Rights Reserved | <a href="https://beian.miit.gov.cn/" target="_blank" title="备案">湘ICP备19018815号-4</a> </div> </div> <div class="footRight"> <ul class="encodeList"> <li> <div class="encodeImg"> <img src="/assets/examples/qrcode_for_gh.jpg" alt="Golang学习网"> </div> <div class="tit">关注公众号</div> <div class="tip">Golang学习网</div> </li> <div class="clear"></div> </ul> </div> <div class="clear"></div> </div> </div> <!-- 微信登录弹窗 --> <style> .popupBg .n-error{ color: red; } </style> <div class="popupBg"> <div class="loginBoxBox"> <div class="imgbg"> <img src="/assets/images/leftlogo.jpg" alt=""> </div> <!-- 微信登录 --> <div class="loginInfo encodeLogin" style="display: none;"> <div class="closeIcon" onclick="$('.popupBg').hide();"></div> <div class="changeLoginType cursorPointer create_wxqrcode" onclick="$('.loginInfo').hide();$('.passwordLogin').show();"> <div class="tip">密码登录在这里</div> </div> <div class="encodeInfo"> <div class="tit"><i></i> 微信扫码登录或注册</div> <div class="encodeImg"> <span id="wx_login_qrcode"><img src="/assets/examples/code.png" alt="二维码"></span> <!-- <div class="refreshBox"> <p>二维码失效</p> <button type="button" class="create_wxqrcode">刷新1111</button> </div> --> </div> <div class="tip">打开微信扫一扫,快速登录/注册</div> </div> <div class="beforeLoginTip">登录即同意 <a href="#" class="aBlue" title="用户协议">用户协议</a> 和 <a href="#" class="aBlue" title="隐私政策">隐私政策</a></div> </div> <!-- 密码登录 --> <div class="loginInfo passwordLogin"> <div class="closeIcon" onclick="$('.popupBg').hide();"></div> <div class="changeLoginType cursorPointer create_wxqrcode" onclick="$('.loginInfo').hide();$('.encodeLogin').show();"> <div class="tip">微信登录更方便</div> </div> <div class="passwordInfo"> <ul class="logintabs selfTabMenu"> <li class="selfTabItem loginFormLi curr">密码登录</li> <li class="selfTabItem registerFormBox ">注册账号</li> </ul> <div class="selfTabContBox"> <div class="selfTabCont loginFormBox" style="display: block;"> <form name="form" id="login-form" class="form-vertical form" method="POST" action="/index/user/login"> <input type="hidden" name="url" value="//www.17golang.com/article/388439.html"/> <input type="hidden" name="__token__" value="8ef78792521a8eb10135b42491426172" /> <div class="form-group" style="height:70px;"> <input class="form-control" id="account" type="text" name="account" value="" data-rule="required" placeholder="邮箱/用户名" autocomplete="off"> </div> <div class="form-group" style="height:70px;"> <input class="form-control" id="password" type="password" name="password" data-rule="required;password" placeholder="密码" autocomplete="off"> </div> <div class="codeBox" style="height:70px;"> <div class="form-group" style="height:70px; width:205px; float: left;"> <input type="text" name="captcha" class="form-control" placeholder="验证码" data-rule="required;length(4)" /> </div> <span class="input-group-btn" style="padding:0;border:none;"> <img src="/captcha.html" width="100" height="45" onclick="this.src = '/captcha.html?r=' + Math.random();"/> </span> </div> <div class="other"> <a href="#" class="forgetPwd aGray" onclick="$('.loginInfo').hide();$('.passwordForget').show();" title="忘记密码">忘记密码</a> </div> <div class="loginBtn mt25"> <button type="submit">登录</button> </div> </form> </div> <div class="selfTabCont registerFormBox" style="display: none;"> <form name="form1" id="register-form" class="form-vertical form" method="POST" action="/index/user/register"> <input type="hidden" name="invite_user_id" value="0"/> <input type="hidden" name="url" value="//www.17golang.com/article/388439.html"/> <input type="hidden" name="__token__" value="8ef78792521a8eb10135b42491426172" /> <div class="form-group" style="height:70px;"> <input type="text" name="email" id="email2" data-rule="required;email" class="form-control" placeholder="邮箱"> </div> <div class="form-group" style="height:70px;"> <input type="text" id="username" name="username" data-rule="required;username" class="form-control" placeholder="用户名必须3-30个字符"> </div> <div class="form-group" style="height:70px;"> <input type="password" id="password2" name="password" data-rule="required;password" class="form-control" placeholder="密码必须6-30个字符"> </div> <div class="codeBox" style="height:70px;"> <div class="form-group" style="height:70px; width:205px; float: left;"> <input type="text" name="captcha" class="form-control" placeholder="验证码" data-rule="required;length(4)" /> </div> <span class="input-group-btn" style="padding:0;border:none;"> <img src="/captcha.html" width="100" height="45" onclick="this.src = '/captcha.html?r=' + Math.random();"/> </span> </div> <div class="loginBtn"> <button type="submit">注册</button> </div> </form> </div> </div> </div> <div class="beforeLoginTip">登录即同意 <a href="https://www.17golang.com/about/3.html" target="_blank" class="aBlue" title="用户协议">用户协议</a> 和 <a href="https://www.17golang.com/about/4.html" target="_blank" class="aBlue" title="隐私政策">隐私政策</a></div> </div> <!-- 重置密码 --> <div class="loginInfo passwordForget"> <div class="closeIcon" onclick="$('.popupBg').hide();"></div> <div class="returnLogin cursorPointer" onclick="$('.passwordForget').hide();$('.passwordLogin').show();">返回登录</div> <div class="passwordInfo"> <ul class="logintabs selfTabMenu"> <li class="selfTabItem">重置密码</li> </ul> <div class="selfTabContBox"> <div class="selfTabCont"> <form id="resetpwd-form" class="form-horizontal form-layer nice-validator n-default n-bootstrap form" method="POST" action="/api/user/resetpwd.html" novalidate="novalidate"> <div style="height:70px;"> <input type="text" class="form-control" id="email" name="email" value="" placeholder="输入邮箱" aria-invalid="true"> </div> <div class="codeBox" style="height:70px;"> <div class="form-group" style="height:70px; width:205px; float: left;"> <input type="text" name="captcha" class="form-control" placeholder="验证码" /> </div> <span class="input-group-btn" style="padding:0;border:none;"> <a href="javascript:;" class="btn btn-primary btn-captcha cursorPointer" style="background: #2080F8; border-radius: 4px; color: #fff; padding: 12px; position: absolute;" data-url="/api/ems/send.html" data-type="email" data-event="resetpwd">发送验证码</a> </span> </div> <input type="password" class="form-control" id="newpassword" name="newpassword" value="" placeholder="请输入6-18位密码"> <div class="loginBtn mt25"> <button type="submit">重置密码</button> </div> </form> </div> </div> </div> </div> </div> </div> <script src="/assets/js/juejin-theme.js?v=20260613b" defer></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?e34c3e8ab31ba35d7e1c48ea8d77315f"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script src="/assets/js/frontend/common.js"></script> </body> </html>