当前位置:首页 > 文章列表 > 文章 > php教程 > PHP中文乱码解决方法与编码设置指南

PHP中文乱码解决方法与编码设置指南

2026-05-01 23:21:59 0浏览 收藏
本文系统梳理了PHP中文乱码问题的五大核心成因与对应解决方案:从确保PHP文件以UTF-8无BOM格式保存、在脚本顶部强制设置HTTP响应头、HTML中正确声明meta charset,到统一数据库字符集为真正的UTF-8(utf8mb4),再到启用并配置mbstring扩展以保障多字节字符串安全处理——每一步都直击乱码根源,兼顾开发环境、HTTP协议、前端渲染、数据存储与PHP内部处理全链路,助你彻底告别方块、问号和错乱字符,让中文在PHP项目中稳定、准确、优雅地呈现。

PHP中文乱码怎么彻底解决_PHP字符编码设置与修复方法【解答】

如果您在PHP项目中遇到中文显示为方块、问号或乱码字符,则可能是由于文件编码、HTTP响应头、数据库连接或HTML声明之间存在不一致。以下是解决此问题的步骤:

一、确保PHP源文件以UTF-8无BOM格式保存

PHP解析器按字节读取源文件,若文件含BOM(\xEF\xBB\xBF)或保存为GBK/ANSI等编码,将导致输出前置不可见字符,进而触发“headers already sent”错误或使中文无法正确渲染。

1、使用VS Code打开PHP文件,右下角点击当前编码标识(如“GBK”或“UTF-8 with BOM”)。

2、选择“通过编码重新打开”,再选“UTF-8”。

3、再次点击编码标识,选择“另存为编码”,勾选“UTF-8(不带BOM)”并覆盖保存。

4、在Linux终端执行:file -i your_script.php,确认输出含“charset=utf-8”且无“with bom”字样。

二、在脚本顶部强制设置HTTP响应头为UTF-8

浏览器依据HTTP响应头中的Content-Type字段决定解码方式;若缺失charset或值为latin1/GBK,即使页面内容是UTF-8字节流,也会被错误解析为乱码。

1、在PHP文件最开头(任何echo、print、空白行、HTML或PHP关闭标签“?>”之前)插入该行代码。

2、写入:header('Content-Type: text/html; charset=utf-8');

3、运行curl命令验证:curl -I http://yoursite.com/test.php,检查响应头是否包含“Content-Type: text/html; charset=utf-8”。

三、在HTML文档head中同步声明meta charset

当CDN缓存响应头、服务器全局配置覆盖PHP header,或用户手动修改浏览器编码时,HTML内的meta标签可作为后备解码提示,必须与header保持严格一致,否则引发冲突。

1、将标签置于HTML的区域起始位置,紧接后、前。</p> <p>2、写入:<strong><font color="green"><meta charset="UTF-8"></font></strong>。</p> <p>3、禁用旧式写法如<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">,因其易与HTTP头冲突且已过时。</p> <h2>四、统一数据库连接与表结构字符集为utf8mb4</h2> <p>MySQL的utf8实为utf8mb3,仅支持最多3字节字符,无法存储emoji及部分生僻汉字;而utf8mb4是完整UTF-8实现。若数据库、表、字段、连接层四者任一环节未设为utf8mb4,读取中文即出现乱码。</p> <p>1、建库时执行:<strong><font color="green">CREATE DATABASE db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;</font></strong></p> <p>2、建表时对文本字段显式指定:<strong><font color="green">VARCHAR(255) CHARACTER SET utf8mb4;</font></strong></p> <p>3、mysqli连接后立即执行:<strong><font color="green">mysqli_set_charset($conn, 'utf8mb4');</font></strong></p> <p>4、PDO连接时在DSN中加入:<strong><font color="green">mysql:host=localhost;dbname=test;charset=utf8mb4</font></strong>。</p> <h2>五、使用mbstring扩展统一内部字符串处理编码</h2> <p>PHP默认字符串函数(如strlen、substr)按单字节操作,对UTF-8中文会截断字节流,导致乱码或异常;mbstring扩展提供多字节安全函数,并需设定内部编码基准,否则函数行为不可控。</p> <p>1、确认php.ini中启用扩展:<strong><font color="green">extension=mbstring</font></strong>且未被分号注释。</p> <p>2、在脚本开头调用:<strong><font color="green">mb_internal_encoding('UTF-8');</font></strong></p> <p>3、替换原生函数:用<strong><font color="green">mb_strlen()</font></strong>替代strlen(),用<strong><font color="green">mb_substr()</font></strong>替代substr()。</p><p>以上就是本文的全部内容了,是否有顺利帮助你解决问题?若是能给你带来学习上的帮助,请大家多多支持golang学习网!更多关于文章的相关知识,也可关注golang学习网公众号。</p> </div> <div class="labsList"> <a href="javascript:;" title="php">php</a> </div> <div class="cateBox"> <div class="cateItem"> <a href="/article/584747.html" title="美团外卖满减券怎么领?省钱攻略大全" class="img_box"> <img src="/uploads/20260501/177764890369f4c5071a9d3.png" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="美团外卖满减券怎么领?省钱攻略大全">美团外卖满减券怎么领?省钱攻略大全 </a> <dl> <dt class="lineOverflow"><a href="/article/584747.html" title="美团外卖满减券怎么领?省钱攻略大全" class="aBlack">上一篇<i></i></a></dt> <dd class="lineTwoOverflow">美团外卖满减券怎么领?省钱攻略大全</dd> </dl> </div> <div class="cateItem"> <a href="/article/584749.html" title="响应式导航栏实现技巧分享" class="img_box"> <img src="/uploads/20260501/177764896669f4c546afd77.jpg" onerror="this.onerror='',this.src='/assets/images/moren/morentu.png'" alt="响应式导航栏实现技巧分享"> </a> <dl> <dt class="lineOverflow"><a href="/article/584749.html" class="aBlack" title="响应式导航栏实现技巧分享">下一篇<i></i></a></dt> <dd class="lineTwoOverflow">响应式导航栏实现技巧分享</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/620227.html" class="img_box" title="PHP-FPM 子进程打满导致 502 怎么排查:从 Nginx 错误日志到 pm.max_children 调整"> <img src="/uploads/20260709/1783565727-502-workers-full.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP-FPM 子进程打满导致 502 怎么排查:从 Nginx 错误日志到 pm.max_children 调整"> </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>   |  2天前  |   <a href="/articletag/1214_new_0_1.html" class="aLightGray" title="nginx">nginx</a> · <a href="/articletag/5276_new_0_1.html" class="aLightGray" title="php-fpm">php-fpm</a> · <a href="/articletag/39782_new_0_1.html" class="aLightGray" title="php教程">php教程</a> · <a href="/articletag/39965_new_0_1.html" class="aLightGray" title="502错误">502错误</a> · <a href="/articletag/40016_new_0_1.html" class="aLightGray" title="故障复盘">故障复盘</a> · <a href="/articletag/40191_new_0_1.html" class="aLightGray" title="慢日志">慢日志</a> · <a href="javascript:;" class="aLightGray" title="Nginx">Nginx</a> <a href="javascript:;" class="aLightGray" title="php-fpm">php-fpm</a> <a href="javascript:;" class="aLightGray" title="性能排查">性能排查</a> <a href="javascript:;" class="aLightGray" title="PHP教程">PHP教程</a> <a href="javascript:;" class="aLightGray" title="502 Bad Gateway">502 Bad Gateway</a> <a href="javascript:;" class="aLightGray" title="pm.max_children">pm.max_children</a> <a href="javascript:;" class="aLightGray" title="慢日志">慢日志</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620227.html" class="aBlack" target="_blank" title="PHP-FPM 子进程打满导致 502 怎么排查:从 Nginx 错误日志到 pm.max_children 调整">PHP-FPM 子进程打满导致 502 怎么排查:从 Nginx 错误日志到 pm.max_children 调整</a> </dt> <dd class="cont2"> <span><i class="view"></i>407浏览</span> <span class="collectBtn user_collection" data-id="620227" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620213.html" class="img_box" title="PHP HTTP 超时探测器怎么写:状态码、耗时和日志验收"> <img src="/uploads/20260708/1783515909-php-http-probe-check.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP HTTP 超时探测器怎么写:状态码、耗时和日志验收"> </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>   |  3天前  |   <a href="/articletag/51_new_0_1.html" class="aLightGray" title="日志">日志</a> · <a href="/articletag/540_new_0_1.html" class="aLightGray" title="HTTP">HTTP</a> · <a href="/articletag/898_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/40175_new_0_1.html" class="aLightGray" title="接口监控">接口监控</a> · <a href="javascript:;" class="aLightGray" title="请求超时">请求超时</a> <a href="javascript:;" class="aLightGray" title="stream_context_create">stream_context_create</a> <a href="javascript:;" class="aLightGray" title="PHP教程">PHP教程</a> <a href="javascript:;" class="aLightGray" title="PHP HTTP请求">PHP HTTP请求</a> <a href="javascript:;" class="aLightGray" title="接口探测器">接口探测器</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620213.html" class="aBlack" target="_blank" title="PHP HTTP 超时探测器怎么写:状态码、耗时和日志验收">PHP HTTP 超时探测器怎么写:状态码、耗时和日志验收</a> </dt> <dd class="cont2"> <span><i class="view"></i>289浏览</span> <span class="collectBtn user_collection" data-id="620213" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620203.html" class="img_box" title="PHP 上传文件怎么安全校验:$_FILES、finfo 和 move_uploaded_file 实战"> <img src="/uploads/20260708/1783493936-php-upload-boundary.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 上传文件怎么安全校验:$_FILES、finfo 和 move_uploaded_file 实战"> </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>   |  3天前  |   <a href="/articletag/616_new_0_1.html" class="aLightGray" title="文件上传">文件上传</a> · <a href="/articletag/39745_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/40164_new_0_1.html" class="aLightGray" title="安全校验">安全校验</a> · <a href="javascript:;" class="aLightGray" title="move_uploaded_file">move_uploaded_file</a> <a href="javascript:;" class="aLightGray" title="$_FILES">$_FILES</a> <a href="javascript:;" class="aLightGray" title="finfo_file">finfo_file</a> <a href="javascript:;" class="aLightGray" title="PHP上传文件">PHP上传文件</a> <a href="javascript:;" class="aLightGray" title="文件安全校验">文件安全校验</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620203.html" class="aBlack" target="_blank" title="PHP 上传文件怎么安全校验:$_FILES、finfo 和 move_uploaded_file 实战">PHP 上传文件怎么安全校验:$_FILES、finfo 和 move_uploaded_file 实战</a> </dt> <dd class="cont2"> <span><i class="view"></i>409浏览</span> <span class="collectBtn user_collection" data-id="620203" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620194.html" class="img_box" title="PHP Session 高并发为什么会卡住:从文件锁迁到 Redis 会话存储"> <img src="/uploads/20260708/1783486790-php-session-file-lock.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP Session 高并发为什么会卡住:从文件锁迁到 Redis 会话存储"> </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>   |  3天前  |   <a href="/articletag/40157_new_0_1.html" class="aLightGray" title="[]">[]</a> · <a href="javascript:;" class="aLightGray" title="[]">[]</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620194.html" class="aBlack" target="_blank" title="PHP Session 高并发为什么会卡住:从文件锁迁到 Redis 会话存储">PHP Session 高并发为什么会卡住:从文件锁迁到 Redis 会话存储</a> </dt> <dd class="cont2"> <span><i class="view"></i>164浏览</span> <span class="collectBtn user_collection" data-id="620194" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620175.html" class="img_box" title="PHP 文件上传怎么做才安全:从 $_FILES 校验到落盘和清理"> <img src="/uploads/20260707/1783412382-php-upload-lifecycle.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 文件上传怎么做才安全:从 $_FILES 校验到落盘和清理"> </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>   |  4天前  |   <a href="/articletag/616_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/40141_new_0_1.html" class="aLightGray" title="$_FILES">$_FILES</a> · <a href="/articletag/40142_new_0_1.html" class="aLightGray" title="上传安全">上传安全</a> · <a href="/articletag/40143_new_0_1.html" class="aLightGray" title="MIME">MIME</a> · <a href="javascript:;" class="aLightGray" title="PHP文件上传">PHP文件上传</a> <a href="javascript:;" class="aLightGray" title="move_uploaded_file">move_uploaded_file</a> <a href="javascript:;" class="aLightGray" title="$_FILES">$_FILES</a> <a href="javascript:;" class="aLightGray" title="文件校验">文件校验</a> <a href="javascript:;" class="aLightGray" title="MIME">MIME</a> <a href="javascript:;" class="aLightGray" title="PHP教程">PHP教程</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620175.html" class="aBlack" target="_blank" title="PHP 文件上传怎么做才安全:从 $_FILES 校验到落盘和清理">PHP 文件上传怎么做才安全:从 $_FILES 校验到落盘和清理</a> </dt> <dd class="cont2"> <span><i class="view"></i>242浏览</span> <span class="collectBtn user_collection" data-id="620175" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620151.html" class="img_box" title="PHP 表单校验错误怎么回填:保留输入、定位字段和友好提示"> <img src="/uploads/20260702/1782961488-php-form-error-refill.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 表单校验错误怎么回填:保留输入、定位字段和友好提示"> </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/1433_new_0_1.html" class="aLightGray" title="PHP">PHP</a> · <a href="/articletag/5304_new_0_1.html" class="aLightGray" title="错误提示">错误提示</a> · <a href="/articletag/39947_new_0_1.html" class="aLightGray" title="表单校验">表单校验</a> · <a href="/articletag/39991_new_0_1.html" class="aLightGray" title="用户体验">用户体验</a> · <a href="/articletag/40122_new_0_1.html" class="aLightGray" title="服务端验证">服务端验证</a> · <a href="javascript:;" class="aLightGray" title="用户体验">用户体验</a> <a href="javascript:;" class="aLightGray" title="表单校验">表单校验</a> <a href="javascript:;" class="aLightGray" title="服务端验证">服务端验证</a> <a href="javascript:;" class="aLightGray" title="PHP教程">PHP教程</a> <a href="javascript:;" class="aLightGray" title="错误回填">错误回填</a> <a href="javascript:;" class="aLightGray" title="字段错误">字段错误</a> <a href="javascript:;" class="aLightGray" title="旧输入">旧输入</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620151.html" class="aBlack" target="_blank" title="PHP 表单校验错误怎么回填:保留输入、定位字段和友好提示">PHP 表单校验错误怎么回填:保留输入、定位字段和友好提示</a> </dt> <dd class="cont2"> <span><i class="view"></i>134浏览</span> <span class="collectBtn user_collection" data-id="620151" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620140.html" class="img_box" title="PHP Session 迁移到 Redis:从本机文件到集中存储的回归检查清单"> <img src="/uploads/20260701/1782893643-php-session-files-risk.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP Session 迁移到 Redis:从本机文件到集中存储的回归检查清单"> </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/220_new_0_1.html" class="aLightGray" title="Redis">Redis</a> · <a href="/articletag/3600_new_0_1.html" class="aLightGray" title="迁移">迁移</a> · <a href="/articletag/4365_new_0_1.html" class="aLightGray" title="session">session</a> · <a href="/articletag/39782_new_0_1.html" class="aLightGray" title="php教程">php教程</a> · <a href="/articletag/39862_new_0_1.html" class="aLightGray" title="登录态">登录态</a> · <a href="javascript:;" class="aLightGray" title="redis">redis</a> <a href="javascript:;" class="aLightGray" title="session">session</a> <a href="javascript:;" class="aLightGray" title="phpredis">phpredis</a> <a href="javascript:;" class="aLightGray" title="PHP教程">PHP教程</a> <a href="javascript:;" class="aLightGray" title="session.save_handler">session.save_handler</a> <a href="javascript:;" class="aLightGray" title="分布式登录">分布式登录</a> <a href="javascript:;" class="aLightGray" title="回归检查">回归检查</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620140.html" class="aBlack" target="_blank" title="PHP Session 迁移到 Redis:从本机文件到集中存储的回归检查清单">PHP Session 迁移到 Redis:从本机文件到集中存储的回归检查清单</a> </dt> <dd class="cont2"> <span><i class="view"></i>145浏览</span> <span class="collectBtn user_collection" data-id="620140" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620114.html" class="img_box" title="PHP 老接口迁移变更单:从散落 $_POST 到 Request DTO 与统一错误响应"> <img src="/uploads/20260630/1782803371-php-dto-migration-entry.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 老接口迁移变更单:从散落 $_POST 到 Request DTO 与统一错误响应"> </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/1223_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/25013_new_0_1.html" class="aLightGray" title="DTO">DTO</a> · <a href="/articletag/39770_new_0_1.html" class="aLightGray" title="接口设计">接口设计</a> · <a href="javascript:;" class="aLightGray" title="php">php</a> <a href="javascript:;" class="aLightGray" title="参数校验">参数校验</a> <a href="javascript:;" class="aLightGray" title="统一错误响应">统一错误响应</a> <a href="javascript:;" class="aLightGray" title="Request DTO">Request DTO</a> <a href="javascript:;" class="aLightGray" title="接口迁移">接口迁移</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620114.html" class="aBlack" target="_blank" title="PHP 老接口迁移变更单:从散落 $_POST 到 Request DTO 与统一错误响应">PHP 老接口迁移变更单:从散落 $_POST 到 Request DTO 与统一错误响应</a> </dt> <dd class="cont2"> <span><i class="view"></i>199浏览</span> <span class="collectBtn user_collection" data-id="620114" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620103.html" class="img_box" title="PHP 表单提交后刷新重复提交怎么办:PRG 模式和闪存提示这样做"> <img src="/uploads/20260630/1782787294-php-prg-duplicate-flow.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 表单提交后刷新重复提交怎么办:PRG 模式和闪存提示这样做"> </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/1433_new_0_1.html" class="aLightGray" title="PHP">PHP</a> · <a href="/articletag/25404_new_0_1.html" class="aLightGray" title="PRG">PRG</a> · <a href="/articletag/39920_new_0_1.html" class="aLightGray" title="表单提交">表单提交</a> · <a href="/articletag/39990_new_0_1.html" class="aLightGray" title="重复提交">重复提交</a> · <a href="/articletag/39991_new_0_1.html" class="aLightGray" title="用户体验">用户体验</a> · <a href="javascript:;" class="aLightGray" title="用户体验">用户体验</a> <a href="javascript:;" class="aLightGray" title="重复提交">重复提交</a> <a href="javascript:;" class="aLightGray" title="PHP表单">PHP表单</a> <a href="javascript:;" class="aLightGray" title="PRG模式">PRG模式</a> <a href="javascript:;" class="aLightGray" title="闪存消息">闪存消息</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620103.html" class="aBlack" target="_blank" title="PHP 表单提交后刷新重复提交怎么办:PRG 模式和闪存提示这样做">PHP 表单提交后刷新重复提交怎么办:PRG 模式和闪存提示这样做</a> </dt> <dd class="cont2"> <span><i class="view"></i>232浏览</span> <span class="collectBtn user_collection" data-id="620103" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620099.html" class="img_box" title="PHP-FPM 慢请求报警运行手册:从 slowlog 到进程池参数调整"> <img src="/uploads/20260629/1782728272-php-fpm-runbook-fix.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP-FPM 慢请求报警运行手册:从 slowlog 到进程池参数调整"> </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/1433_new_0_1.html" class="aLightGray" title="PHP">PHP</a> · <a href="/articletag/5276_new_0_1.html" class="aLightGray" title="php-fpm">php-fpm</a> · <a href="/articletag/39902_new_0_1.html" class="aLightGray" title="运维排查">运维排查</a> · <a href="/articletag/40062_new_0_1.html" class="aLightGray" title="慢请求">慢请求</a> · <a href="javascript:;" class="aLightGray" title="运维">运维</a> <a href="javascript:;" class="aLightGray" title="slowlog">slowlog</a> <a href="javascript:;" class="aLightGray" title="php-fpm">php-fpm</a> <a href="javascript:;" class="aLightGray" title="进程池">进程池</a> <a href="javascript:;" class="aLightGray" title="慢请求">慢请求</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620099.html" class="aBlack" target="_blank" title="PHP-FPM 慢请求报警运行手册:从 slowlog 到进程池参数调整">PHP-FPM 慢请求报警运行手册:从 slowlog 到进程池参数调整</a> </dt> <dd class="cont2"> <span><i class="view"></i>336浏览</span> <span class="collectBtn user_collection" data-id="620099" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620088.html" class="img_box" title="PHP 同步接口队列化改造趋势:从请求内处理到后台 Job Worker"> <img src="/uploads/20260629/1782713908-php-queue-adoption-path.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 同步接口队列化改造趋势:从请求内处理到后台 Job Worker"> </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/220_new_0_1.html" class="aLightGray" title="Redis">Redis</a> · <a href="/articletag/39767_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/39841_new_0_1.html" class="aLightGray" title="接口优化">接口优化</a> · <a href="/articletag/40038_new_0_1.html" class="aLightGray" title="后台任务">后台任务</a> · <a href="javascript:;" class="aLightGray" title="异步处理">异步处理</a> <a href="javascript:;" class="aLightGray" title="PHP队列">PHP队列</a> <a href="javascript:;" class="aLightGray" title="后台任务">后台任务</a> <a href="javascript:;" class="aLightGray" title="Redis队列">Redis队列</a> <a href="javascript:;" class="aLightGray" title="接口优化">接口优化</a> <a href="javascript:;" class="aLightGray" title="Job Worker">Job Worker</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620088.html" class="aBlack" target="_blank" title="PHP 同步接口队列化改造趋势:从请求内处理到后台 Job Worker">PHP 同步接口队列化改造趋势:从请求内处理到后台 Job Worker</a> </dt> <dd class="cont2"> <span><i class="view"></i>178浏览</span> <span class="collectBtn user_collection" data-id="620088" data-type="article" title="收藏"><i class="collect"></i>收藏</span> </dd> </dl> </div> </li> <li> <div class="contBox"> <a href="/article/620086.html" class="img_box" title="PHP 导出大数据内存耗尽排查:从一次性数组到流式写 CSV"> <img src="/uploads/20260629/1782711021-php-csv-memory-problem.webp" onerror="this.src='/assets/images/moren/morentu.png'" alt="PHP 导出大数据内存耗尽排查:从一次性数组到流式写 CSV"> </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/39694_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/39908_new_0_1.html" class="aLightGray" title="后端排查">后端排查</a> · <a href="/articletag/40035_new_0_1.html" class="aLightGray" title="CSV导出">CSV导出</a> · <a href="javascript:;" class="aLightGray" title="php">php</a> <a href="javascript:;" class="aLightGray" title="生成器">生成器</a> <a href="javascript:;" class="aLightGray" title="内存耗尽">内存耗尽</a> <a href="javascript:;" class="aLightGray" title="fputcsv">fputcsv</a> <a href="javascript:;" class="aLightGray" title="CSV导出">CSV导出</a> <a href="javascript:;" class="aLightGray" title="流式写入">流式写入</a> </span> </dd> <dt class="lineOverflow"> <a href="/article/620086.html" class="aBlack" target="_blank" title="PHP 导出大数据内存耗尽排查:从一次性数组到流式写 CSV">PHP 导出大数据内存耗尽排查:从一次性数组到流式写 CSV</a> </dt> <dd class="cont2"> <span><i class="view"></i>471浏览</span> <span class="collectBtn user_collection" data-id="620086" 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">4416次使用</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">4077次使用</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">4058次使用</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">4243次使用</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">4218次使用</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/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> <li> <dl> <dt class="lineTwoOverflow"><a href="/article/591040.html" class="aBlack" title="TelegramBotWebApp数据验证技巧">TelegramBotWebApp数据验证技巧</a></dt> <dd> <span class="left">2026-05-06</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备2023003363号-1</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="//17golang.com/article/584748.html"/> <input type="hidden" name="__token__" value="ac69af126fbc8608c70452021cdb333a" /> <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="//17golang.com/article/584748.html"/> <input type="hidden" name="__token__" value="ac69af126fbc8608c70452021cdb333a" /> <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>