商城首页欢迎来到中国正版软件门户

您的位置:首页 >自定义Joomla页面标题:利用语言覆盖机制实现动态标题

自定义Joomla页面标题:利用语言覆盖机制实现动态标题

  发布于2025-12-21 阅读(0)

扫一扫,手机访问

自定义Joomla页面标题:利用语言覆盖机制实现动态标题

本文详细介绍了如何在Joomla 3.9及更高版本中,利用其强大的语言覆盖(Language Override)机制,结合自定义PHP代码,实现动态生成和设置页面``标签。教程将涵盖从定义语言常量、通过`JText::_`获取本地化文本,到正确使用`JDocument::setTitle()`方法设置页面标题的完整流程,并提供实用代码示例和关键注意事项,帮助开发者创建更具SEO友好性和用户体验的动态标题。</p><h2>Joomla语言覆盖机制简介</h2><p>Joomla的语言覆盖(Language Override)功能是一个强大的工具,允许网站管理员自定义Joomla核心、组件或模块中使用的任何文本字符串,而无需修改原始文件。这对于网站的国际化、本地化以及个性化内容展示至关重要。通过在后台创建一个新的语言常量及其对应的文本,我们可以在前端通过JText::_('YOUR_LANGUAGE_CONSTANT')函数获取到这个自定义文本。</p><h2>挑战:动态设置页面标题</h2><p>在Joomla中,页面标题(即HTML <title> 标签)通常由菜单项、文章标题或特定组件的元数据决定。然而,在某些复杂的应用场景中,我们可能需要根据页面内容、用户选择或其他动态变量来生成完全自定义且动态变化的页面标题。例如,一个旅游网站可能需要根据用户访问的国家显示“便宜的[国家名]度假”这样的标题。</p><p>最初,开发者可能会尝试将动态文本替换到文章内容中,但这并不能直接影响页面的<title>标签。核心问题在于,文章内容和页面标题是两个不同的概念,需要不同的API来处理。</p><h3>错误的尝试与分析</h3><p>在尝试将动态文本应用于页面标题时,常见的误区是将处理文章内容替换的逻辑直接套用到页面标题上。例如,以下代码片段展示了将占位符替换到文章内容中的正确方法:</p><pre class="brush:php;toolbar:false">// 假设 $var['country'] 包含国家信息,例如 'peru' $placeholder_country = JText::_('COM_ACME_PLACEHOLDER_COUNTRY_'.strtoupper(str_replace('-','_',$var['country']))); // 如果语言常量不存在或为空,则设置为空字符串 if($placeholder_country === 'COM_ACME_PLACEER_COUNTRY_'.strtoupper(str_replace('-','_',$var['country'])) || !$placeholder_country) { $placeholder_country = ''; } // 将占位符替换到文章文本中 $article->text = JString::str_ireplace("{%placeholder_country%}", $placeholder_country, $article->text);</pre><p>这段代码能够成功地将 {%placeholder_country%} 替换为通过语言覆盖定义的文本,并显示在文章内容中。</p><p>然而,当尝试将类似逻辑应用于页面标题时,可能会遇到问题:</p><pre class="brush:php;toolbar:false">// 尝试获取语言覆盖文本 $placeholder_nicktitle = JText::_('TITLENICK_'.strtoupper(str_replace('-','_',$var['country']))); if($placeholder_nicktitle === 'TITLENICK_'.strtoupper(str_replace('-','_',$var['country'])) || !$placeholder_nicktitle) { $placeholder_nicktitle = ''; } // 错误地尝试设置标题,这将导致500错误或无效操作 // $document->setTitle = JString::str_ireplace("{%placeholder_nicktitle%}", $placeholder_nicktitle, $article->text); // 或 // $document =& JFactory::getDocument(); // $document->setTitle("JString::str_ireplace(". {%placeholder_nicktitle%}", $placeholder_nicktitle, $article->text);");</pre><p>上述尝试失败的原因有两点:</p><ol><li>$document->setTitle 并不是一个可赋值的属性,而是一个用于设置页面标题的方法。</li><li>setTitle() 方法期望接收一个字符串作为参数,而不是一个函数调用或复杂的表达式。</li></ol><h2>正确实现动态页面标题</h2><p>要正确地利用Joomla语言覆盖机制设置动态页面标题,我们需要明确以下步骤:</p><h3>步骤一:定义语言常量</h3><p>首先,在Joomla后台创建语言覆盖。</p><ol><li>进入Joomla后台,导航至 <strong>扩展 -> 语言 -> 覆盖</strong>。</li><li>点击 <strong>新建</strong>。</li><li>在 <strong>语言常量</strong> 字段中输入您自定义的常量,例如 TITLENICK_PERU。</li><li>在 <strong>文本</strong> 字段中输入该常量对应的页面标题,例如 便宜的秘鲁假期。</li><li>保存。</li></ol><p>重复此过程,为所有需要动态标题的国家或变量定义相应的语言常量。</p><h3>步骤二:在PHP代码中获取动态标题文本</h3><p>接下来,在您的自定义PHP代码中,使用 JText::_ 函数根据当前上下文(例如 $var['country'])获取对应的语言覆盖文本。</p><pre class="brush:php;toolbar:false">// 获取Joomla文档对象 $document = JFactory::getDocument(); // 假设 $var['country'] 已经获取到当前国家信息,例如 'peru' $country_code = strtoupper(str_replace('-','_',$var['country'])); // 转换为大写并替换连字符为下划线,例如 'PERU' // 构造语言常量名,例如 'TITLENICK_PERU' $language_constant = 'TITLENICK_' . $country_code; // 通过 JText::_ 获取语言覆盖中定义的文本 $dynamic_title = JText::_($language_constant); // 检查是否成功获取到文本,如果未找到覆盖或文本为空,则使用默认值或空字符串 if ($dynamic_title === $language_constant || empty($dynamic_title)) { // 如果没有找到对应的语言覆盖,可以设置一个默认标题或者根据需要处理 $dynamic_title = '默认页面标题'; // 例如:'全球度假胜地' }</pre><h3>步骤三:设置页面标题</h3><p>获取到动态标题文本后,使用 JDocument::setTitle() 方法将其设置为当前页面的标题。</p><pre class="brush:php;toolbar:false">// ... (接续步骤二的代码) // 使用获取到的动态标题设置页面标题 $document->setTitle($dynamic_title);</pre><h3>完整示例代码</h3><p>将以上步骤整合,形成一个完整的代码片段:</p><pre class="brush:php;toolbar:false"><?php defined('_JEXEC') or die; // 确保在Joomla环境中运行 // 获取Joomla文档对象 $document = JFactory::getDocument(); // 假设 $var 数组已包含 'country' 键,例如 $var['country'] = 'peru'; // 请根据您的实际数据源调整 $var 的获取方式 $var = array('country' => 'peru'); // 示例数据 // 1. 构造语言常量名 $country_code = strtoupper(str_replace('-','_',$var['country'])); $language_constant = 'TITLENICK_' . $country_code; // 例如 'TITLENICK_PERU' // 2. 通过 JText::_ 获取语言覆盖中定义的文本 $dynamic_title = JText::_($language_constant); // 3. 验证获取结果,如果语言常量不存在或文本为空,则提供备用标题 if ($dynamic_title === $language_constant || empty($dynamic_title)) { // 备用方案:可以设置一个通用标题,或者从其他地方获取默认值 $dynamic_title = '探索世界各地假期'; // 默认标题 } // 4. 使用 JDocument::setTitle() 方法设置页面标题 $document->setTitle($dynamic_title); // 此外,如果还需要在文章内容中替换文本,可以继续使用 JString::str_ireplace // 假设 $article->text 已经包含了文章内容 // $article->text = JString::str_ireplace("{%placeholder_nicktitle%}", $dynamic_title, $article->text); ?></pre><h3>注意事项</h3><ul><li><strong>代码执行位置:</strong> 确保这段PHP代码在Joomla页面渲染的早期阶段执行,例如在自定义组件的视图文件、模块的helper文件或插件的onBeforeCompileHead事件中。过晚执行可能导致标题无法被正确设置。</li><li><strong>调试:</strong> 在开发过程中,可以使用 var_dump($dynamic_title); 或 JFactory::getApplication()->enqueueMessage($dynamic_title, 'message'); 来检查 $dynamic_title 的值是否符合预期。</li><li><strong>语言常量命名规范:</strong> 建议使用大写字母和下划线来命名语言常量,以保持一致性并避免冲突。</li><li><strong>默认标题:</strong> 务必处理语言常量未找到或为空的情况,提供一个合理的默认标题,以防止页面标题为空或显示不友好的常量名。</li><li><strong>JString::str_ireplace vs str_ireplace:</strong> Joomla的 JString::str_ireplace 是PHP内置 str_ireplace 函数的一个包装,功能基本相同,但在某些Joomla旧版本或特定编码环境下可能提供额外的兼容性。通常情况下,可以直接使用PHP原生的 str_ireplace。</li></ul><h2>总结</h2><p>通过以上步骤,我们可以有效地利用Joomla的语言覆盖机制和 JDocument::setTitle() 方法,实现灵活且强大的动态页面标题设置。这种方法不仅能够提升网站的SEO表现,还能根据用户上下文提供更加个性化和精确的页面描述,从而优化用户体验。关键在于理解Joomla不同API的职责,将语言文本的获取与页面标题的设置清晰地分离,并确保代码在正确的生命周期阶段执行。</p> </div> <div class="laiyuan"> 本文转载于:互联网 如有侵犯,请联系zhengruancom@outlook.com删除。<br/>免责声明:正软商城发布此文仅为传递信息,不代表正软商城认同其观点或证实其描述。 </div> <div class="zrSypBox"> <p>上一篇:<a href="https://www.zhengruan.com/news/543465" title="如何通过BMI在线计算器判断肥胖等级?一级二级三级标准划分" class="aRed">如何通过BMI在线计算器判断肥胖等级?一级二级三级标准划分</a></p> <p class="right">下一篇:<a href="https://www.zhengruan.com/news/543477" title="oppo如何打开office_Oppo手机或设备打开Office方法" class="aRed">oppo如何打开office_Oppo手机或设备打开Office方法</a></p> <div class="clear"></div> </div> <div class="zrDtxwBox"> <div class="zrByddTitle"> <span><h2>产品推荐</h2></span> </div> <ul class="zrTxdmList3"> <li class="one"> <div class="zrTxdmCont5"> <div class="zrTxdmImg4 dianji"> <a href="https://www.zhengruan.com/product/69" class="img"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/cd14258f0172a172f8a80798c38c1577.jpg" alt="DAEMON Tools Lite 10"></a> <span class="xianshi"> <p>售后无忧</p> <em><a href="https://www.zhengruan.com/product/69" title="立即购买>">立即购买></a></em> </span> </div> <div class="zrTxdmIn4"> <dl> <dt><a href="https://www.zhengruan.com/product/69" title="DAEMON Tools Lite 10【序列号终身授权 + 中文版 + Win】" class="aBlack">DAEMON Tools Lite 10【序列号终身授权 + 中文版 + Win】</a></dt> <dd> <span>¥150.00</span> <p>office旗舰店</p> </dd> </dl> </div> </div> </li> <li > <div class="zrTxdmCont5"> <div class="zrTxdmImg4 dianji"> <a href="https://www.zhengruan.com/product/67" class="img"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/fbf473d4d30833324962e441c0f18265.jpg" alt="DAEMON Tools Ultra 5"></a> <span class="xianshi"> <p>售后无忧</p> <em><a href="https://www.zhengruan.com/product/67" title="立即购买>">立即购买></a></em> </span> </div> <div class="zrTxdmIn4"> <dl> <dt><a href="https://www.zhengruan.com/product/67" title="DAEMON Tools Ultra 5【序列号终身授权 + 中文版 + Win】" class="aBlack">DAEMON Tools Ultra 5【序列号终身授权 + 中文版 + Win】</a></dt> <dd> <span>¥198.00</span> <p>office旗舰店</p> </dd> </dl> </div> </div> </li> <li > <div class="zrTxdmCont5"> <div class="zrTxdmImg4 dianji"> <a href="https://www.zhengruan.com/product/68" class="img"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/1ae250399abf4ff584d86d52c79b5bb6.jpg" alt="DAEMON Tools Pro 8"></a> <span class="xianshi"> <p>售后无忧</p> <em><a href="https://www.zhengruan.com/product/68" title="立即购买>">立即购买></a></em> </span> </div> <div class="zrTxdmIn4"> <dl> <dt><a href="https://www.zhengruan.com/product/68" title="DAEMON Tools Pro 8【序列号终身授权 + 中文版 + Win】" class="aBlack">DAEMON Tools Pro 8【序列号终身授权 + 中文版 + Win】</a></dt> <dd> <span>¥189.00</span> <p>office旗舰店</p> </dd> </dl> </div> </div> </li> <li > <div class="zrTxdmCont5"> <div class="zrTxdmImg4 dianji"> <a href="https://www.zhengruan.com/product/29" class="img"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/77d3c04866e1b842d9b6ff0e9368bdf8.jpg" alt="CorelDRAW X8 简体中文"></a> <span class="xianshi"> <p>售后无忧</p> <em><a href="https://www.zhengruan.com/product/29" title="立即购买>">立即购买></a></em> </span> </div> <div class="zrTxdmIn4"> <dl> <dt><a href="https://www.zhengruan.com/product/29" title="CorelDRAW X8 简体中文【标准版 + Win】" class="aBlack">CorelDRAW X8 简体中文【标准版 + Win】</a></dt> <dd> <span>¥1788.00</span> <p>office旗舰店</p> </dd> </dl> </div> </div> </li> <div class="clear"></div> </ul> </div> </div> <ul class="zrZbrjList" style="padding-top:10px;"> <li> <a href="https://www.zhengruan.com/news/602717" class="img1" title="小青账如何隐藏默认账本?小青账隐藏默认账本教程"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20260322/177415590332670.jpg" alt="小青账如何隐藏默认账本?小青账隐藏默认账本教程"> <span>正版软件</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/602717" title="小青账如何隐藏默认账本?小青账隐藏默认账本教程" class="aBlack">小青账如何隐藏默认账本?小青账隐藏默认账本教程</a></dt> <dd class="cont1">小青账如何隐藏默认账本?小青账是一款非常实用且强大的记账软件,为广大用户提供了方便的记账功能。不少用户对如何隐藏默认账本感到困惑,下面小编将介绍小青账隐藏默认账本的操作方法。还不知道的小伙伴快来看看吧!</dd> <dd class="cont2"> <!--<span class="cont1"><img src="zrimages/example/img10.png"/>山外的鸭子哥</span>--> <span class="cont2"><b></b>9小时前 13:05</span> <span class="cont4"><b></b>0</span> </dd> </dl> </li> <li> <a href="https://www.zhengruan.com/news/602702" class="img1" title="如何使用讯飞星火生成ppt?利用讯飞星火AI生成高质量ppt教程"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20260322/177415511294914.jpg" alt="如何使用讯飞星火生成ppt?利用讯飞星火AI生成高质量ppt教程"> <span>正版软件</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/602702" title="如何使用讯飞星火生成ppt?利用讯飞星火AI生成高质量ppt教程" class="aBlack">如何使用讯飞星火生成ppt?利用讯飞星火AI生成高质量ppt教程</a></dt> <dd class="cont1">讯飞星火怎么生成高质量ppt?你是否曾经在深夜里为第二天的工作汇报而焦头烂额,翻遍互联网寻找灵感和模板,又或者因为繁琐的排版和设计而感到力不从心?现在,有了讯飞星火AI生成PPT,你的所有烦恼都将一扫而光!</dd> <dd class="cont2"> <!--<span class="cont1"><img src="zrimages/example/img10.png"/>山外的鸭子哥</span>--> <span class="cont2"><b></b>9小时前 12:52</span> <span class="cont4"><b></b>0</span> </dd> </dl> </li> <li> <a href="https://www.zhengruan.com/news/602685" class="img1" title="搜狐视频怎么投屏到电视播放?搜狐视频app电视投屏方法教程"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20260322/177415429040351.jpg" alt="搜狐视频怎么投屏到电视播放?搜狐视频app电视投屏方法教程"> <span>正版软件</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/602685" title="搜狐视频怎么投屏到电视播放?搜狐视频app电视投屏方法教程" class="aBlack">搜狐视频怎么投屏到电视播放?搜狐视频app电视投屏方法教程</a></dt> <dd class="cont1">搜狐视频怎么投屏到电视播放?有时候我们在看电视的时候会觉得怕屏幕不够大,看的不大清楚,这时候就会想如果有个大屏幕就好了,今天小编教你们如何用搜狐视频投屏到电视上,彻底的解放双手。搜狐视频app电视投屏教程1、首先打开搜狐视频app,搜索想看的视频或影视剧2、进入详情页后点击有TV字样的图标3、然后搜索附近的设备连接我们的电视4、当电视上出现了手机正在播放的</dd> <dd class="cont2"> <!--<span class="cont1"><img src="zrimages/example/img10.png"/>山外的鸭子哥</span>--> <span class="cont2"><b></b>9小时前 12:38</span> <span class="cont4"><b></b>0</span> </dd> </dl> </li> <li> <a href="https://www.zhengruan.com/news/602581" class="img1" title="豆瓣怎么设置主页不可见?豆瓣设置隐私主页教程"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20260322/177414783984372.png" alt="豆瓣怎么设置主页不可见?豆瓣设置隐私主页教程"> <span>正版软件</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/602581" title="豆瓣怎么设置主页不可见?豆瓣设置隐私主页教程" class="aBlack">豆瓣怎么设置主页不可见?豆瓣设置隐私主页教程</a></dt> <dd class="cont1">豆瓣怎么设置主页不可见?大家在使用豆瓣的时候,经常会在主页发布自己的心情状态、吐槽等等内容,然后其他用户进我们的主页的时候就能很轻松的看到我们发过的内容,那么我们能不能设置主页的隐私呢?要怎么设置呢?下面小编就为大家介绍一下豆瓣个人主页设置隐私的办法。</dd> <dd class="cont2"> <!--<span class="cont1"><img src="zrimages/example/img10.png"/>山外的鸭子哥</span>--> <span class="cont2"><b></b>11小时前 10:50</span> <span class="cont4"><b></b>0</span> </dd> </dl> </li> <li> <a href="https://www.zhengruan.com/news/601716" class="img1" title="夸克浏览器怎么设置电脑模式?夸克浏览器设置成电脑模式教程"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20260321/177406573756200.png" alt="夸克浏览器怎么设置电脑模式?夸克浏览器设置成电脑模式教程"> <span>正版软件</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/601716" title="夸克浏览器怎么设置电脑模式?夸克浏览器设置成电脑模式教程" class="aBlack">夸克浏览器怎么设置电脑模式?夸克浏览器设置成电脑模式教程</a></dt> <dd class="cont1">夸克浏览器怎么设置电脑模式?嘿,兄弟们,你是否曾经需要在手机上看网页,但又要让页面显示效果如同在电脑上的体验?如果是,那么恭喜您,夸克浏览器就是您的不二之选!它不仅拥有简洁明了的界面设计,而且夸克浏览器手机版也可以轻松设置成电脑版,让你在手机端也能够享受到如同在电脑上的浏览体验。</dd> <dd class="cont2"> <!--<span class="cont1"><img src="zrimages/example/img10.png"/>山外的鸭子哥</span>--> <span class="cont2"><b></b>昨天 03-21 12:02</span> <span class="cont4"><b></b>0</span> </dd> </dl> </li> </ul> </div> <!--左边 end--> <!--右边--> <div class="zrZuoRight"> <!-- <div class="zrBanner"><a href="#"><img src="zrimages/example/img11.png"/></a></div>--> <div class="zrByddBox"> <div class="zrByddTitle"><span><h2>最新发布</h2></span></div> <ul class="zrByddList"> <li> <a href="https://www.zhengruan.com/news/1561" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/upload/news/20191220/1576825692n90594/2019-12-20-15-08-12-5dfc735c5581a-1.jpg" alt="微软公布全新开源编程语言Bosque:正则化 告别for循环"> <span>1</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/1561" title="微软公布全新开源编程语言Bosque:正则化 告别for循环" class="aBlack">微软公布全新开源编程语言Bosque:正则化 告别for循环</a></dt> <dd><b></b>2284天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/1562" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/upload/news/20191220/1576825776n3925/2019-12-20-15-09-36-5dfc73b032cee-1.jpg" alt="微软推出最新程序语言Bosque 以Functors取代Loop循环"> <span>2</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/1562" title="微软推出最新程序语言Bosque 以Functors取代Loop循环" class="aBlack">微软推出最新程序语言Bosque 以Functors取代Loop循环</a></dt> <dd><b></b>2284天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/467167" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20250908/175730816420885.jpg" alt="C语言中\n是什么意思?换行转义字符详解"> <span>3</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/467167" title="C语言中\n是什么意思?换行转义字符详解" class="aBlack">C语言中\n是什么意思?换行转义字符详解</a></dt> <dd><b></b>195天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/63159" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="" alt="探析Spring Boot框架的优点和特色"> <span>4</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/63159" title="探析Spring Boot框架的优点和特色" class="aBlack">探析Spring Boot框架的优点和特色</a></dt> <dd><b></b>511天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/85739" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="" alt="深入比较PyCharm社区版和专业版的功能"> <span>5</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/85739" title="深入比较PyCharm社区版和专业版的功能" class="aBlack">深入比较PyCharm社区版和专业版的功能</a></dt> <dd><b></b>449天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/89680" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="" alt="专家观点:谷歌是否会继续支持Golang的探讨"> <span>6</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/89680" title="专家观点:谷歌是否会继续支持Golang的探讨" class="aBlack">专家观点:谷歌是否会继续支持Golang的探讨</a></dt> <dd><b></b>425天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/16470" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20230427/168257472829656.jpg" alt="Python实战教程:批量转换多种音乐格式"> <span>7</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/16470" title="Python实战教程:批量转换多种音乐格式" class="aBlack">Python实战教程:批量转换多种音乐格式</a></dt> <dd><b></b>1057天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/41129" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="" alt="如何在在线答题中实现试卷的自动批改和自动评分"> <span>8</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/41129" title="如何在在线答题中实现试卷的自动批改和自动评分" class="aBlack">如何在在线答题中实现试卷的自动批改和自动评分</a></dt> <dd><b></b>885天前</dd> </dl> <div class="clear"></div> </li> <li> <a href="https://www.zhengruan.com/news/87821" class="img"> <img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20240301/170927298835686.jpg" alt="解决Python安装失败的问题"> <span>9</span> </a> <dl> <dt><a href="https://www.zhengruan.com/news/87821" title="解决Python安装失败的问题" class="aBlack">解决Python安装失败的问题</a></dt> <dd><b></b>435天前</dd> </dl> <div class="clear"></div> </li> </ul> </div> <div class="zrRmgzBox" style="margin-top:20px;"> <div class="zrByddTitle"> <span><h2>相关推荐</h2></span> </div> <ul class="zrXwdtList"> <li><a href="https://www.zhengruan.com/news/602717" title="小青账如何隐藏默认账本?小青账隐藏默认账本教程" class="aBlack">小青账如何隐藏默认账本?小青账隐藏默认账本教程</a></li> <li><a href="https://www.zhengruan.com/news/602702" title="如何使用讯飞星火生成ppt?利用讯飞星火AI生成高质量ppt教程" class="aBlack">如何使用讯飞星火生成ppt?利用讯飞星火AI生成高质量ppt教程</a></li> <li><a href="https://www.zhengruan.com/news/602685" title="搜狐视频怎么投屏到电视播放?搜狐视频app电视投屏方法教程" class="aBlack">搜狐视频怎么投屏到电视播放?搜狐视频app电视投屏方法教程</a></li> <li><a href="https://www.zhengruan.com/news/602581" title="豆瓣怎么设置主页不可见?豆瓣设置隐私主页教程" class="aBlack">豆瓣怎么设置主页不可见?豆瓣设置隐私主页教程</a></li> <li><a href="https://www.zhengruan.com/news/601716" title="夸克浏览器怎么设置电脑模式?夸克浏览器设置成电脑模式教程" class="aBlack">夸克浏览器怎么设置电脑模式?夸克浏览器设置成电脑模式教程</a></li> <li><a href="https://www.zhengruan.com/news/601701" title="夸克浏览器怎么开启成人模式?夸克浏览器设置成人模式的方法" class="aBlack">夸克浏览器怎么开启成人模式?夸克浏览器设置成人模式的方法</a></li> <li><a href="https://www.zhengruan.com/news/601689" title="东方甄选如何进行企业团购?东方甄选企业团购教程" class="aBlack">东方甄选如何进行企业团购?东方甄选企业团购教程</a></li> <li><a href="https://www.zhengruan.com/news/601123" title="饿了么怎么让别人代付?饿了么让别人代付的步骤教程" class="aBlack">饿了么怎么让别人代付?饿了么让别人代付的步骤教程</a></li> <li><a href="https://www.zhengruan.com/news/601110" title="饿了么如何设置小额免密支付功能?饿了么设置小额免密支付教程" class="aBlack">饿了么如何设置小额免密支付功能?饿了么设置小额免密支付教程</a></li> </ul> </div> <div class="zrRmgzBox" style="margin-top:30px;"> <div class="zrByddTitle"> <span><h2>热门关注</h2></span> </div> <ul class="zrRmgzList"> <li> <span><a href="https://www.zhengruan.com/product/19" title="Xshell 6 简体中文"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/3c06ff5d8d3a8b234a536d602bcc0477.jpg" alt="Xshell 6 简体中文"></a></span> <dl> <dt><a href="https://www.zhengruan.com/product/19" title="Xshell 6 简体中文" class="aBlack">Xshell 6 简体中文</a></dt> <dd class="unstar unstar5"></dd> <dd class="cont1">¥899.00-¥1149.00</dd> </dl> <div class="clear"></div> </li> <li> <span><a href="https://www.zhengruan.com/product/48" title="DaVinci Resolve Studio 16 简体中文"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/60b5be77e7fc0ffb073d36675dc61585.jpg" alt="DaVinci Resolve Studio 16 简体中文"></a></span> <dl> <dt><a href="https://www.zhengruan.com/product/48" title="DaVinci Resolve Studio 16 简体中文" class="aBlack">DaVinci Resolve Studio 16 简体中文</a></dt> <dd class="unstar unstar5"></dd> <dd class="cont1">¥2550.00-¥2550.00</dd> </dl> <div class="clear"></div> </li> <li> <span><a href="https://www.zhengruan.com/product/47" title="Camtasia 2019 简体中文"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/537cf14c8ab78e3bca0cfe8e91c8b683.jpg" alt="Camtasia 2019 简体中文"></a></span> <dl> <dt><a href="https://www.zhengruan.com/product/47" title="Camtasia 2019 简体中文" class="aBlack">Camtasia 2019 简体中文</a></dt> <dd class="unstar unstar5"></dd> <dd class="cont1">¥689.00-¥689.00</dd> </dl> <div class="clear"></div> </li> <li> <span><a href="https://www.zhengruan.com/product/35" title="Luminar 3 简体中文"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/d253cca5f121bda501d04debdf3a4fa2.jpg" alt="Luminar 3 简体中文"></a></span> <dl> <dt><a href="https://www.zhengruan.com/product/35" title="Luminar 3 简体中文" class="aBlack">Luminar 3 简体中文</a></dt> <dd class="unstar unstar5"></dd> <dd class="cont1">¥288.00-¥288.00</dd> </dl> <div class="clear"></div> </li> <li> <span><a href="https://www.zhengruan.com/product/49" title="Apowersoft 录屏王 简体中文"><img onerror="this.src='https://www.zhengruan.com/statics/www/zrimages/404_bg.png'" src="https://www.zhengruan.com/uploads/20200428/c61fdff8f15649063e6b2617c8aa96fb.jpg" alt="Apowersoft 录屏王 简体中文"></a></span> <dl> <dt><a href="https://www.zhengruan.com/product/49" title="Apowersoft 录屏王 简体中文" class="aBlack">Apowersoft 录屏王 简体中文</a></dt> <dd class="unstar unstar5"></dd> <dd class="cont1">¥129.00-¥339.00</dd> </dl> <div class="clear"></div> </li> </ul> </div> </div> <!--右边 end--> <div class="clear"></div> </div> <!--主体 end--> <!--底部--> <!--底部--> <div class="zrFoot"> <div class="zrFootIn"> <div class="zrFootMsg">网站备案号: <a href="javascript:void(0)" target="" style="text-decoration: none;"> <font color="#9b9db0">湘ICP备19013367号-1 联系邮箱:zhengruancom@outlook.com<br> Copyright ©2018-2020</font> </a> </div> </div> </div> <!--底部 end--> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?2f243b178fc8c70f194fc14781f06522"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <!--底部 end--> <script> function countView(){ $.ajax({ type: "post", url: "/countView?&time="+new Date().getTime(), data:{'type':'news','id':"543472"}, async:false, dataType: "json", success: function(result){ console.log(result) }, error:function(){ } }); } function code_highlight() { SyntaxHighlighter.all() } $(function(){ code_highlight(); countView(); $("#qrcode").qrcode({width:150,height:150,text:"https://m.zhengruan.com/news/543472"}) }) </script> </body> </html>