0

0

一文详细PHP模板引擎的原理(附代码示例)

藏色散人

藏色散人

发布时间:2022-08-07 14:59:47

|

3842人浏览过

|

来源于cnblogs

转载

开发一个web项目,通常分为两部分,一部分是gui,即界面、美工,使用html,css,js编写,另一部分则是业务逻辑,即程序、功能,使用php编写。而模板引擎则是联系这两部分的“桥梁”,可理解成一个php类,里面定义了许多方法,实现了将php的原始输出加载上界面样式后再输出。

没用模板之前的编写的代码是这样的:





<?php echo $title; ?>



这样的话美工与逻辑没有分离,简单的说就是PHP程序员不仅要写程序还要精通美工,这往往十分困难,因此需要将这两部分工作分开。

在此通过自己创建一个简单的模板引擎为例子,更好的体会模板引擎的原理。

之前说了开发一个web项目分成GUI与业务逻辑两部分,因此我们创建两个文件夹,一个命名为“templates”,里边存放模板,新建一个tpl.html文件,另一个命名为“PHP”,里边存放业务逻辑,新建一个index.php文件。

tpl.html文件代码通常是这样:

立即学习PHP免费学习笔记(深入)”;



<{$title}>

<{ $content;}>

可以看出来,和之前的代码相比,tpl.html中只有html代码,没有php代码,但是增加了新的标签,这类标签是自己定义的,里面的内容只有经过模板引擎编译后才能被识别,编译后的文件存放在“templates_c”文件夹下。这个文件主要是界面设计用的,将大量使用到CSS,JS等技术。

这时候tpl.html和index.php仍旧是分离的,互不干扰,因此需要一个“桥梁”连接,即模板引擎,其实就是一个PHP类,故在此可以创建一个mytpl.class.php的PHP文件。

SDCMS-B2C商城网站管理系统
SDCMS-B2C商城网站管理系统

SDCMS-B2C商城网站管理系统是一个以php+MySQL进行开发的B2C商城网站源码。 本次更新如下: 【新增的功能】 1、模板引擎增加包含文件父路径过滤; 2、增加模板编辑保存功能过滤; 3、增加对统计代码参数的过滤 4、新增会员价设置(每个商品可以设置不同级不同价格) 5、将微信公众号授权提示页单独存放到data/wxtemp.php中,方便修改 【优化或修改】 1、修改了check_b

下载

mytpl.class.php文件通常定义一个类MyTpl,类中需定义一个数组tpl_var[]用于存放tpl.html中自定义内容标签的参数,此外还需定义一些方法,这些方法最主要的目的是将tpl.hml中无法识别的的内容标签转换成PHP语句,然后再写到一个“templates_c”文件夹下的tpl_c.html中,这个过程就是所谓的编译。

通常tpl_c.html文件的代码是这样的:



<?php echo $this->tpl_var[“title”]; ?></head>

<body><?php echo $this->tpl_var[“content”]; ?}></body>

</html></pre><p>可以看出上面的代码是可以被识别的,因为自定义的内容标签已经被替换成PHP语句了,但是title和content的值是多少我们还不得而知,这时候之前创建的index.php要上场了.<br></p>
<h3 id="indexphp通常它代码是这样的">index.php通常它代码是这样的:</h3><pre class="brush:php;toolbar:false;">include  “tpl.class.php文件”;//加载模板引擎

$tpl = new MyTpl();//实例化一个模板类

$title = “标题”;

$content = “内容”;

$tpl->assign(“title”,$title);//调用模板类中的方法,分配变量

$tpl->assign(“content”,$content);

$tpl->display(“tpl.html”);//调用模板类中的方法,用于显示编译后的内容</pre><p>上面的代码只是一些简单的描述代码,其中的变量的值可以是直接定义的也可以是从数据库中获取的,此外该文件还可以编写一些复杂的PHP程序,这也就是之前说的业务逻辑。</p>
<p>这样GUI和业务逻辑的工作就分离了,美工设计人员只需要编写模板文件就可以改变web的界面,而PHP程序员则可以专心编写自己的程序。</p>
<p>公司内部一般都有自己的模板引擎,而通常模板引擎自己写的话完全没有必要,因为市面上已经有一些很成熟的模板引擎了,比如Smarty,我们只需要懂得如何使用它就好了。</p>
<p>推荐学习:《<a href="https://www.php.cn/course/list/29.html" target="_blank">PHP视频教程</a>》<br></p>					</div>
					<div class="artmoreart ">
													<div class="artdp artptit"><span></span>
								<p>相关文章</p>
							</div>
							<div class="artmores flexColumn">
																	<a class="artmrlis flexRow" href="/faq/2025051.html" title="如何将 PHP 动态链接替换为静态 URL(纯 HTML 实现)"><b></b>
										<p class="overflowclass">如何将 PHP 动态链接替换为静态 URL(纯 HTML 实现)</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/2024657.html" title="PHPUnit 中使用严格引用比较模拟对象参数的正确方法"><b></b>
										<p class="overflowclass">PHPUnit 中使用严格引用比较模拟对象参数的正确方法</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/2024606.html" title="如何在 Symfony 中正确显示重定向后的 Flash 消息"><b></b>
										<p class="overflowclass">如何在 Symfony 中正确显示重定向后的 Flash 消息</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/2023224.html" title="PHPMailer 邮件模板显示 HTML 源码而非渲染效果的解决方案"><b></b>
										<p class="overflowclass">PHPMailer 邮件模板显示 HTML 源码而非渲染效果的解决方案</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/2019356.html" title="Yii2 高级模板中解决模型未知属性错误的缓存刷新方案"><b></b>
										<p class="overflowclass">Yii2 高级模板中解决模型未知属性错误的缓存刷新方案</p>
									</a>
															</div>
													<div class="aritcle_card flexRow">
							<div class="artcardd flexRow">
								<a class="aritcle_card_img" href="https://pan.quark.cn/s/f79bda81fa1b" title="PHP速学教程(入门到精通)"><img
										src="https://img.php.cn/upload/Recdownload/000/000/085/666bdff371e4d231.png" alt="PHP速学教程(入门到精通)"></a>
								<div class="aritcle_card_info flexColumn">
									<a href="https://pan.quark.cn/s/f79bda81fa1b" title="PHP速学教程(入门到精通)">PHP速学教程(入门到精通)</a>
									<p>PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!</p>
								</div>
								<a href="https://pan.quark.cn/s/f79bda81fa1b" title="PHP速学教程(入门到精通)" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a>
							</div>
						</div>							<div class="artmoretabs flexRow">
								<p>相关标签:</p>
								<div class="mtbs flexRow">
									<a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/zt/15714.html" target="_blank">php</a>								</div>
							</div>
						
						<p class="statement">本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn</p>
						<div class="lastanext flexRow">
													<a class="lastart flexRow" href="/faq/494709.html" title="2022最新浅析PHP特性、内核及架构"><span>上一篇:</span>2022最新浅析PHP特性、内核及架构</a>
													<a class="nextart flexRow" href="/faq/494711.html" title="教你创建虚拟主机并运行php项目(phpstudy + wamp)"><span>下一篇:</span>教你创建虚拟主机并运行php项目(phpstudy + wamp)</a>
												</div>
					</div>

					<div class="artlef-down ">
													<div class="authormore ">
								<div class="rightdTitle flexRow">
									<div class="title-left flexRow"> <b></b>
										<p>作者最新文章</p>
									</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/524047.html" title="一文详解通过php+roadrunner实现grpc服务端"><b></b>
												<p class="overflowclass">一文详解通过php+roadrunner实现grpc服务端</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-21 15:57</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/524049.html" title="分享redis多维度排行思路"><b></b>
												<p class="overflowclass">分享redis多维度排行思路</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-21 16:01</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/524978.html" title="linux jboss是什么"><b></b>
												<p class="overflowclass">linux jboss是什么</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-23 10:10</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/525031.html" title="linux中yum是什么意思"><b></b>
												<p class="overflowclass">linux中yum是什么意思</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-23 10:15</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/525448.html" title="分享一个PHP免费验证码(附代码)"><b></b>
												<p class="overflowclass">分享一个PHP免费验证码(附代码)</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-23 17:33</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/525450.html" title="详述file_get_contents、getimagesize严重耗时问题"><b></b>
												<p class="overflowclass">详述file_get_contents、getimagesize严重耗时问题</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-23 17:36</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/525451.html" title="用八个demo搞懂Go语言defer的五大特性"><b></b>
												<p class="overflowclass">用八个demo搞懂Go语言defer的五大特性</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-23 17:40</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/526211.html" title="图文详解如何在Vue项目中集成Ace代码编辑器"><b></b>
												<p class="overflowclass">图文详解如何在Vue项目中集成Ace代码编辑器</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-24 10:52</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/526297.html" title="聊聊前端怎么获取电池信息"><b></b>
												<p class="overflowclass">聊聊前端怎么获取电池信息</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-24 10:55</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/526298.html" title="分享接口设计文档的12个注意点"><b></b>
												<p class="overflowclass">分享接口设计文档的12个注意点</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2023-04-24 10:58</p>
											</div>
										</div>
								</div>
															</div>
						
						<div class="moreAi ">
							<div class="rightdTitle flexRow">
								<div class="title-left flexRow"> <b></b>
									<p>热门AI工具</p>
								</div>
								<a target="_blank" class="rititle-more flexRow" href="/ai" title="热门AI工具"><span>更多</span><b></b></a>
							</div>

							<div class="moreailist flexRow">
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/723" title="DeepSeek" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/000/000/175679963982777.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="DeepSeek" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">DeepSeek</p>
												<p class="overflowclass abriptwo">幻方量化公司旗下的开源大模型平台</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/code/large-model" title="AI大模型" class="aidcontbp flexRow flexcenter">AI大模型</p>
																													<p href="/ai/tag/code/open-plat" title="开放平台" class="aidcontbp flexRow flexcenter">开放平台</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/726" title="豆包大模型" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/000/000/175680204067325.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="豆包大模型" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">豆包大模型</p>
												<p class="overflowclass abriptwo">字节跳动自主研发的一系列大型语言模型</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/code/large-model" title="AI大模型" class="aidcontbp flexRow flexcenter">AI大模型</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/725" title="通义千问" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/000/000/175679974228210.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="通义千问" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">通义千问</p>
												<p class="overflowclass abriptwo">阿里巴巴推出的全能AI助手</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/code/large-model" title="AI大模型" class="aidcontbp flexRow flexcenter">AI大模型</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/854" title="腾讯元宝" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/000/000/175679978251103.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="腾讯元宝" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">腾讯元宝</p>
												<p class="overflowclass abriptwo">腾讯混元平台推出的AI助手</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/office/docs" title="文档处理" class="aidcontbp flexRow flexcenter">文档处理</p>
																													<p href="/ai/tag/office/excel" title="Excel 表格" class="aidcontbp flexRow flexcenter">Excel 表格</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/724" title="文心一言" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/000/000/175679974557049.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="文心一言" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">文心一言</p>
												<p class="overflowclass abriptwo">文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/code/large-model" title="AI大模型" class="aidcontbp flexRow flexcenter">AI大模型</p>
																													<p href="/ai/tag/text/chinese-writing" title="中文写作" class="aidcontbp flexRow flexcenter">中文写作</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/1507" title="讯飞写作" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/969/633/68b7a4153cd86671.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="讯飞写作" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">讯飞写作</p>
												<p class="overflowclass abriptwo">基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/text/chinese-writing" title="中文写作" class="aidcontbp flexRow flexcenter">中文写作</p>
																													<p href="/ai/tag/text/write" title="写作工具" class="aidcontbp flexRow flexcenter">写作工具</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/1115" title="即梦AI" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/001/246/273/68b6d8f7c530c315.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="即梦AI" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">即梦AI</p>
												<p class="overflowclass abriptwo">一站式AI创作平台,免费AI图片和视频生成。</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/image/image-titching" title="图片拼接" class="aidcontbp flexRow flexcenter">图片拼接</p>
																													<p href="/ai/tag/image/image-create" title="图画生成" class="aidcontbp flexRow flexcenter">图画生成</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/808" title="ChatGPT" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/000/000/175679970194596.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="ChatGPT" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">ChatGPT</p>
												<p class="overflowclass abriptwo">最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/code/large-model" title="AI大模型" class="aidcontbp flexRow flexcenter">AI大模型</p>
																													<p href="/ai/tag/text/chinese-writing" title="中文写作" class="aidcontbp flexRow flexcenter">中文写作</p>
																											</div>
																							</div>
										</a>
									</div>
																	<div class="aidcons flexRow  check ">
										<a target="_blank" href="/ai/821" title="智谱清言 - 免费全能的AI助手" class="aibtns flexRow">
											<img src="https://img.php.cn/upload/ai_manual/000/000/000/175679976181507.png?x-oss-process=image/resize,m_mfit,h_70,w_70,limit_0" alt="智谱清言 - 免费全能的AI助手" class="aibtnimg"
												onerror="this.src='/static/lhimages/moren/morentu.png'">
											<div class="aibtn-right flexColumn">
												<p class="overflowclass abripone">智谱清言 - 免费全能的AI助手</p>
												<p class="overflowclass abriptwo">智谱清言 - 免费全能的AI助手</p>
																									<div class="aidconstab flexRow">
																												<p href="/ai/tag/code/large-model" title="AI大模型" class="aidcontbp flexRow flexcenter">AI大模型</p>
																													<p href="/ai/tag/ai-application/software" title="PC软件" class="aidcontbp flexRow flexcenter">PC软件</p>
																											</div>
																							</div>
										</a>
									</div>
															</div>




						</div>

					</div>


				</div>


			</div>
			<div class="conRight artdtilRight ">
				<div class="artrig-adv ">
                    <script type="text/javascript" src="https://teacher.php.cn/php/MDM3MTk1MGYxYjI5ODJmNTE0ZWVkZTA3NmJhYzhmMjI6Og=="></script>
                </div>
				<div class="hotzt artdtzt">
					<div class="rightdTitle flexRow">
						<div class="title-left flexRow"> <b></b>
							<p>相关专题</p>
						</div>
						<a target="_blank" class="rititle-more flexRow" href="/faq/zt" title="相关专题"><span>更多</span><b></b></a>
					</div>
					<div class="hotztuls flexColumn">
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/cjjgh" class="aClass flexRow hotzta" title="c++ 根号"><img
										src="https://img.php.cn/upload/subject/202601/23/2026012320444626753.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="c++ 根号" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/cjjgh" class="aClass flexRow hotztra overflowclass" title="c++ 根号">c++ 根号</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了c++根号相关教程,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">57</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.23</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/cjjkgxgjchj" class="aClass flexRow hotzta" title="c++空格相关教程合集"><img
										src="https://img.php.cn/upload/subject/202601/23/2026012320405281523.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="c++空格相关教程合集" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/cjjkgxgjchj" class="aClass flexRow hotztra overflowclass" title="c++空格相关教程合集">c++空格相关教程合集</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了c++空格相关教程,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">57</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.23</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/yymhgfdlrkdzh" class="aClass flexRow hotzta" title="yy漫画官方登录入口地址合集"><img
										src="https://img.php.cn/upload/subject/000/000/075/69736af34be45175.jpeg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="yy漫画官方登录入口地址合集" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/yymhgfdlrkdzh" class="aClass flexRow hotztra overflowclass" title="yy漫画官方登录入口地址合集">yy漫画官方登录入口地址合集</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了yy漫画入口相关合集,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">237</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.23</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/mwzxrkdzhz" class="aClass flexRow hotzta" title="漫蛙最新入口地址汇总2026"><img
										src="https://img.php.cn/upload/subject/000/000/075/6973692112ecf650.png?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="漫蛙最新入口地址汇总2026" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/mwzxrkdzhz" class="aClass flexRow hotztra overflowclass" title="漫蛙最新入口地址汇总2026">漫蛙最新入口地址汇总2026</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了漫蛙最新入口地址大全,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">393</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.23</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/cgjmbbcyybc" class="aClass flexRow hotzta" title="C++ 高级模板编程与元编程"><img
										src="https://img.php.cn/upload/subject/202601/23/2026012310161711404.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="C++ 高级模板编程与元编程" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/cgjmbbcyybc" class="aClass flexRow hotztra overflowclass" title="C++ 高级模板编程与元编程">C++ 高级模板编程与元编程</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题深入讲解 C++ 中的高级模板编程与元编程技术,涵盖模板特化、SFINAE、模板递归、类型萃取、编译时常量与计算、C++17 的折叠表达式与变长模板参数等。通过多个实际示例,帮助开发者掌握 如何利用 C++ 模板机制编写高效、可扩展的通用代码,并提升代码的灵活性与性能。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">17</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.23</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phpycwjjchj" class="aClass flexRow hotzta" title="php远程文件教程合集"><img
										src="https://img.php.cn/upload/subject/202601/22/2026012221212384427.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="php远程文件教程合集" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/phpycwjjchj" class="aClass flexRow hotztra overflowclass" title="php远程文件教程合集">php远程文件教程合集</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了php远程文件相关教程,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">103</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.22</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phphdkfhz" class="aClass flexRow hotzta" title="PHP后端开发相关内容汇总"><img
										src="https://img.php.cn/upload/subject/202601/22/2026012221171227888.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="PHP后端开发相关内容汇总" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/phphdkfhz" class="aClass flexRow hotztra overflowclass" title="PHP后端开发相关内容汇总">PHP后端开发相关内容汇总</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了PHP后端开发相关内容,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">73</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.22</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phphhjchj" class="aClass flexRow hotzta" title="php会话教程合集"><img
										src="https://img.php.cn/upload/subject/202601/22/2026012221093386781.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="php会话教程合集" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/phphhjchj" class="aClass flexRow hotztra overflowclass" title="php会话教程合集">php会话教程合集</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了php会话教程相关合集,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">81</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.22</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/btphpbdsxgjch" class="aClass flexRow hotzta" title="宝塔PHP8.4相关教程汇总"><img
										src="https://img.php.cn/upload/subject/202601/22/2026012221024873141.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="宝塔PHP8.4相关教程汇总" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/btphpbdsxgjch" class="aClass flexRow hotztra overflowclass" title="宝塔PHP8.4相关教程汇总">宝塔PHP8.4相关教程汇总</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了宝塔PHP8.4相关教程,阅读专题下面的文章了解更多详细内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">70</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2026.01.22</p>
										</div>
									</div>
								</div>
							</div>
											</div>
				</div>

				<div class="hotdownload ">
					<div class="rightdTitle flexRow">
						<div class="title-left flexRow"> <b></b>
							<p>热门下载</p>
						</div>
						<a target="_blank" class="rititle-more flexRow" href="/xiazai" title="热门下载"><span>更多</span><b></b></a>
					</div>
					<div class="hotdownTab">
						<div class="hdTabs flexRow">
							<div class="check" data-id="onef">网站特效 <b></b> </div> /
							<div class="" data-id="twof">网站源码 <b></b></div> /
							<div class="" data-id="threef">网站素材 <b></b></div> /
							<div class="" data-id="fourf">前端模板 <b></b></div>
						</div>
						<ul class="onef">
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jquery点击弹出大图切换代码" href="/xiazai/js/8641"><span>[图片特效]</span><span>jquery点击弹出大图切换代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="HTML5手机登录注册表单代码" href="/xiazai/js/8640"><span>[表单按钮]</span><span>HTML5手机登录注册表单代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery动画登录注册表单切换代码" href="/xiazai/js/8639"><span>[表单按钮]</span><span>jQuery动画登录注册表单切换代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery滑动解锁登录表单代码" href="/xiazai/js/8638"><span>[表单按钮]</span><span>jQuery滑动解锁登录表单代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jquery智能弹窗提醒" href="/xiazai/js/8637"><span>[图片特效]</span><span>jquery智能弹窗提醒</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery遮罩图片hover翻转效果" href="/xiazai/js/8636"><span>[图片特效]</span><span>jQuery遮罩图片hover翻转效果</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery鼠标点击图片滑动切换特效" href="/xiazai/js/8635"><span>[图片特效]</span><span>jQuery鼠标点击图片滑动切换特效</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="西山居首页jQuery焦点图代码" href="/xiazai/js/8634"><span>[图片特效]</span><span>西山居首页jQuery焦点图代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery评论框插入QQ表情代码" href="/xiazai/js/8633"><span>[表单按钮]</span><span>jQuery评论框插入QQ表情代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="纯CSS3实现超酷幻灯片切换" href="/xiazai/js/8632"><span>[图片特效]</span><span>纯CSS3实现超酷幻灯片切换</span></a>
									</div>
								</li>
													</ul>
						<ul class="twof" style="display:none;">
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11355" title="openaishop"><span>[电商源码]</span><span>openaishop</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11354" title="思翔企(事)业单位文件柜 build 20080313"><span>[其它模板]</span><span>思翔企(事)业单位文件柜 build 20080313</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11353" title="雅龙智能装备工业设备类WordPress主题1.0"><span>[企业站源码]</span><span>雅龙智能装备工业设备类WordPress主题1.0</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11352" title="威发卡自动发卡系统"><span>[电商源码]</span><span>威发卡自动发卡系统</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11351" title="卡密分发系统"><span>[电商源码]</span><span>卡密分发系统</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11350" title="中华陶瓷网"><span>[电商源码]</span><span>中华陶瓷网</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11349" title="简洁粉色食品公司网站"><span>[电商源码]</span><span>简洁粉色食品公司网站</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11348" title="极速网店系统"><span>[电商源码]</span><span>极速网店系统</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11347" title="淘宝妈妈_淘客推广系统"><span>[电商源码]</span><span>淘宝妈妈_淘客推广系统</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11346" title="积客B2SCMS商城系统"><span>[电商源码]</span><span>积客B2SCMS商城系统</span> </a>
									</div>
								</li>
													</ul>
						<ul class="threef" style="display:none;">
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4273" title="手绘热带菠萝水果合集矢量素材"><span>[网站素材]</span><span>手绘热带菠萝水果合集矢量素材</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4272" title="3D礼物主题海报设计下载"><span>[网站素材]</span><span>3D礼物主题海报设计下载</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4271" title="2026马年线性装饰矢量素材"><span>[网站素材]</span><span>2026马年线性装饰矢量素材</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4270" title="货币金融科技金融海报设计下载"><span>[网站素材]</span><span>货币金融科技金融海报设计下载</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4269" title="水墨冬季寒梅傲雪风景矢量模板"><span>[网站素材]</span><span>水墨冬季寒梅傲雪风景矢量模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4268" title="清新拼贴自然环保海报矢量模板"><span>[网站素材]</span><span>清新拼贴自然环保海报矢量模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4267" title="2026马年黑金贺卡矢量模板"><span>[网站素材]</span><span>2026马年黑金贺卡矢量模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4266" title="INS风格快餐美食宣传模板设计下载"><span>[网站素材]</span><span>INS风格快餐美食宣传模板设计下载</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4265" title="蓝色极简网球运动海报矢量模板"><span>[网站素材]</span><span>蓝色极简网球运动海报矢量模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4264" title="情人节超级大促竖版海报设计下载"><span>[网站素材]</span><span>情人节超级大促竖版海报设计下载</span> </a>
									</div>
								</li>
													</ul>
						<ul class="fourf" style="display:none;">
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8590"  title="驾照考试驾校HTML5网站模板"><span>[前端模板]</span><span>驾照考试驾校HTML5网站模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8589"  title="驾照培训服务机构宣传网站模板"><span>[前端模板]</span><span>驾照培训服务机构宣传网站模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8588"  title="HTML5房地产公司宣传网站模板"><span>[前端模板]</span><span>HTML5房地产公司宣传网站模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8587"  title="新鲜有机肉类宣传网站模板"><span>[前端模板]</span><span>新鲜有机肉类宣传网站模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8586"  title="响应式天气预报宣传网站模板"><span>[前端模板]</span><span>响应式天气预报宣传网站模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8585"  title="房屋建筑维修公司网站CSS模板"><span>[前端模板]</span><span>房屋建筑维修公司网站CSS模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8584"  title="响应式志愿者服务网站模板"><span>[前端模板]</span><span>响应式志愿者服务网站模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8583"  title="创意T恤打印店网站HTML5模板"><span>[前端模板]</span><span>创意T恤打印店网站HTML5模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8582"  title="网页开发岗位简历作品展示网页模板"><span>[前端模板]</span><span>网页开发岗位简历作品展示网页模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/8581"  title="响应式人力资源机构宣传网站模板"><span>[前端模板]</span><span>响应式人力资源机构宣传网站模板</span> </a>
									</div>
								</li>
													</ul>
					</div>
					<script>
						$('.hdTabs>div').click(function (e) {
							$('.hdTabs>div').removeClass('check')
							$(this).addClass('check')
							$('.hotdownTab>ul').css('display', 'none')
							$('.' + e.currentTarget.dataset.id).show()
						})
					</script>

				</div>

				<div class="artrig-adv ">
					<script type="text/javascript" src="https://teacher.php.cn/php/MDM3MTk1MGYxYjI5ODJmNTE0ZWVkZTA3NmJhYzhmMjI6Og=="></script>
                </div>



				<div class="xgarts ">
					<div class="rightdTitle flexRow">
						<div class="title-left flexRow"> <b></b>
							<p>相关下载</p>
						</div>
						<a target="_blank" class="rititle-more flexRow" href="/xiazai" title="相关下载"><span>更多</span><b></b></a>
					</div>
					<div class="xgwzlist ">
											<div class="xgwzlid flexRow"><b></b><a target="_blank" title="SDCMS-B2C商城网站管理系统" href="/xiazai/code/8601">SDCMS-B2C商城网站管理系统</a></div>
										</div>

				</div>

				<div class="jpkc">
					<div class="rightdTitle flexRow">
						<div class="title-left flexRow"> <b></b>
							<p>精品课程</p>
						</div>
						<a class="rititle-more flexRow" target="_blank" href="/course/sort_new.html" title="精品课程"><span>更多</span><b></b></a>
					</div>
					<div class=" jpkcTab">
						<div class=" jpkcTabs flexRow">
							<div class="check" data-id="onefd">相关推荐 <b></b> </div> /
							<div class="" data-id="twofd">热门推荐 <b></b></div> /
							<div class="" data-id="threefd">最新课程 <b></b></div>
						</div>
						<div class="onefd jpktabd">
													<div  class="ristyA flexRow " >
								<a target="_blank" href="/course/1673.html" title="Bootstrap 5教程">
									<img src="https://img.php.cn/upload/course/000/000/090/6899a24dcdf73781.png?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="Bootstrap 5教程" class="ristyAimg"
										onerror="this.src='/static/mobimages/moren/morentu.png'">
								</a>
								<div class="ristyaRight flexColumn">
									<a target="_blank" href="/course/1673.html" title="Bootstrap 5教程"
										class="rirightp overflowclass">Bootstrap 5教程</a>

									<div class="risrdown flexRow">
										<p>共46课时 | 3万人学习</p>
									</div>
								</div>
							</div>
													<div  class="ristyA flexRow " >
								<a target="_blank" href="/course/1619.html" title="ThinkPHP6.x 微实战--十天技能课堂">
									<img src="https://img.php.cn/upload/course/000/000/067/6565567e0c514103.png?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="ThinkPHP6.x 微实战--十天技能课堂" class="ristyAimg"
										onerror="this.src='/static/mobimages/moren/morentu.png'">
								</a>
								<div class="ristyaRight flexColumn">
									<a target="_blank" href="/course/1619.html" title="ThinkPHP6.x 微实战--十天技能课堂"
										class="rirightp overflowclass">ThinkPHP6.x 微实战--十天技能课堂</a>

									<div class="risrdown flexRow">
										<p>共26课时 | 1.7万人学习</p>
									</div>
								</div>
							</div>
													<div  class="ristyA flexRow " >
								<a target="_blank" href="/course/1608.html" title="【李炎恢】ThinkPHP8.x 后端框架课程">
									<img src="https://img.php.cn/upload/course/000/000/067/6551b75d28d94404.png?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="【李炎恢】ThinkPHP8.x 后端框架课程" class="ristyAimg"
										onerror="this.src='/static/mobimages/moren/morentu.png'">
								</a>
								<div class="ristyaRight flexColumn">
									<a target="_blank" href="/course/1608.html" title="【李炎恢】ThinkPHP8.x 后端框架课程"
										class="rirightp overflowclass">【李炎恢】ThinkPHP8.x 后端框架课程</a>

									<div class="risrdown flexRow">
										<p>共50课时 | 4.5万人学习</p>
									</div>
								</div>
							</div>
												</div>

						<div class="twofd jpktabd" style="display:none;">
															<div  class="ristyA flexRow " >
									<a target="_blank" href="/course/1656.html" title="JavaScript ES5基础线上课程教学">
										<img src="https://img.php.cn/upload/course/000/000/081/6862652adafef801.png?x-oss-process=image/resize,m_mfit,h_86,w_140,limit_0" alt="JavaScript ES5基础线上课程教学" class="ristyAimg"
											onerror="this.src='/static/mobimages/moren/morentu.png'">
									</a>
									<div class="ristyaRight flexColumn">
										<a target="_blank" href="/course/1656.html" title="JavaScript ES5基础线上课程教学"
											class="rirightp overflowclass">JavaScript ES5基础线上课程教学</a>

										<div class="risrdown flexRow">
											<p>共6课时 | 10.9万人学习</p>
										</div>
									</div>
								</div>
															<div  class="ristyA flexRow " >
									<a target="_blank" href="/course/812.html" title="最新ThinkPHP 5.1全球首发视频教程(60天成就PHP大牛线上培训班课)">
										<img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg?x-oss-process=image/resize,m_mfit,h_86,w_140,limit_0" alt="最新ThinkPHP 5.1全球首发视频教程(60天成就PHP大牛线上培训班课)" class="ristyAimg"
											onerror="this.src='/static/mobimages/moren/morentu.png'">
									</a>
									<div class="ristyaRight flexColumn">
										<a target="_blank" href="/course/812.html" title="最新ThinkPHP 5.1全球首发视频教程(60天成就PHP大牛线上培训班课)"
											class="rirightp overflowclass">最新ThinkPHP 5.1全球首发视频教程(60天成就PHP大牛线上培训班课)</a>

										<div class="risrdown flexRow">
											<p>共79课时 | 151.6万人学习</p>
										</div>
									</div>
								</div>
															<div  class="ristyA flexRow " >
									<a target="_blank" href="/course/639.html" title="phpStudy极速入门视频教程">
										<img src="https://img.php.cn/upload/course/000/000/068/62611ef88fcec821.jpg?x-oss-process=image/resize,m_mfit,h_86,w_140,limit_0" alt="phpStudy极速入门视频教程" class="ristyAimg"
											onerror="this.src='/static/mobimages/moren/morentu.png'">
									</a>
									<div class="ristyaRight flexColumn">
										<a target="_blank" href="/course/639.html" title="phpStudy极速入门视频教程"
											class="rirightp overflowclass">phpStudy极速入门视频教程</a>

										<div class="risrdown flexRow">
											<p>共6课时 | 53.4万人学习</p>
										</div>
									</div>
								</div>
													</div>

						<div class="threefd jpktabd" style="display:none;">
															<div  class="ristyA flexRow " >
										<a target="_blank" href="/course/1696.html" title="最新Python教程 从入门到精通">
											<img src="https://img.php.cn/upload/course/000/000/081/68c135bb72783194.png?x-oss-process=image/resize,m_mfit,h_86,w_140,limit_0" alt="最新Python教程 从入门到精通" class="ristyAimg"
												onerror="this.src='/static/mobimages/moren/morentu.png'">
										</a>
										<div class="ristyaRight flexColumn">
											<a target="_blank" href="/course/1696.html" title="最新Python教程 从入门到精通"
												class="rirightp overflowclass">最新Python教程 从入门到精通</a>

											<div class="risrdown flexRow">
												<p>共4课时 | 20.6万人学习</p>
											</div>
										</div>
									</div>
																<div  class="ristyA flexRow " >
										<a target="_blank" href="/course/1656.html" title="JavaScript ES5基础线上课程教学">
											<img src="https://img.php.cn/upload/course/000/000/081/6862652adafef801.png?x-oss-process=image/resize,m_mfit,h_86,w_140,limit_0" alt="JavaScript ES5基础线上课程教学" class="ristyAimg"
												onerror="this.src='/static/mobimages/moren/morentu.png'">
										</a>
										<div class="ristyaRight flexColumn">
											<a target="_blank" href="/course/1656.html" title="JavaScript ES5基础线上课程教学"
												class="rirightp overflowclass">JavaScript ES5基础线上课程教学</a>

											<div class="risrdown flexRow">
												<p>共6课时 | 10.9万人学习</p>
											</div>
										</div>
									</div>
																<div  class="ristyA flexRow " >
										<a target="_blank" href="/course/1655.html" title="PHP新手语法线上课程教学">
											<img src="https://img.php.cn/upload/course/000/000/081/684a8c23d811b293.png?x-oss-process=image/resize,m_mfit,h_86,w_140,limit_0" alt="PHP新手语法线上课程教学" class="ristyAimg"
												onerror="this.src='/static/mobimages/moren/morentu.png'">
										</a>
										<div class="ristyaRight flexColumn">
											<a target="_blank" href="/course/1655.html" title="PHP新手语法线上课程教学"
												class="rirightp overflowclass">PHP新手语法线上课程教学</a>

											<div class="risrdown flexRow">
												<p>共13课时 | 0.9万人学习</p>
											</div>
										</div>
									</div>
														</div>
						<script>
							$('.jpkcTabs>div').click(function (e) {
								$('.jpkcTabs>div').removeClass('check')
								$(this).addClass('check')
								$('.jpkcTab .jpktabd').css('display', 'none')
								$('.' + e.currentTarget.dataset.id).show()
							})
						</script>

					</div>
				</div>

				<div class="zxarts ">
					<div class="rightdTitle flexRow">
						<div class="title-left flexRow"> <b></b>
							<p>最新文章</p>
						</div>
						<a class="rititle-more flexRow" href="" title="最新文章" target="_blank"><span>更多</span><b></b></a>
					</div>
					<div class="xgwzlist ">
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="php如何判断数组下标是否存在_php存在性检测函数法【教程】" href="/faq/2030702.html">php如何判断数组下标是否存在_php存在性检测函数法【教程】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="PHP中生成指定日期范围内每周特定星期几的所有日期" href="/faq/2030633.html">PHP中生成指定日期范围内每周特定星期几的所有日期</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="如何在 PHP 中生成指定日期范围内每周特定星期几的所有日期" href="/faq/2030632.html">如何在 PHP 中生成指定日期范围内每周特定星期几的所有日期</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="PHP 中生成指定周几的周期性日期序列(如每周一、每周三等)" href="/faq/2030629.html">PHP 中生成指定周几的周期性日期序列(如每周一、每周三等)</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="PHPMailer SMTP 配置在 OVH 服务器上的正确实践" href="/faq/2030615.html">PHPMailer SMTP 配置在 OVH 服务器上的正确实践</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="如何优化 WooCommerce 货币符号 DOM 结构以减少元素数量" href="/faq/2030610.html">如何优化 WooCommerce 货币符号 DOM 结构以减少元素数量</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="将带格式的货币字符串安全转换为整数(单位:分)的完整解析与最佳实践" href="/faq/2030605.html">将带格式的货币字符串安全转换为整数(单位:分)的完整解析与最佳实践</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="基于URL的搜索词短语聚类:高效内存实现方案" href="/faq/2030588.html">基于URL的搜索词短语聚类:高效内存实现方案</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="如何优化 WooCommerce 价格显示以减少 DOM 元素数量" href="/faq/2030587.html">如何优化 WooCommerce 价格显示以减少 DOM 元素数量</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="PHPMailer SMTP 配置指南:OVH 主机环境下的正确邮件发送方案" href="/faq/2030576.html">PHPMailer SMTP 配置指南:OVH 主机环境下的正确邮件发送方案</a></div>
											</div>

				</div>






			</div>



		</div>

	</div>
	<!--底部-->
	<div class="phpFoot">
    <div class="phpFootIn">
        <div class="phpFootCont">
            <div class="phpFootLeft">
                <dl>
                    <dt>
                        <a target="_blank"  href="/about/us.html" rel="nofollow"  title="关于我们" class="cBlack">关于我们</a>
                        <a target="_blank"  href="/about/disclaimer.html" rel="nofollow"  title="免责申明" class="cBlack">免责申明</a>
                        <a target="_blank"  href="/about/jbzx.html" rel="nofollow"  title="举报中心" class="cBlack">举报中心</a>
                        <a   href="javascript:;" rel="nofollow" onclick="advice_data(99999999,'意见反馈')"   title="意见反馈" class="cBlack">意见反馈</a>
                        <a target="_blank"  href="https://www.php.cn/teacher.html" rel="nofollow"   title="讲师合作" class="cBlack">讲师合作</a>
                        <a  target="_blank" href="https://www.php.cn/blog/detail/20304.html" rel="nofollow"  title="广告合作" class="cBlack">广告合作</a>
                        <a  target="_blank" href="/new/"    title="最新文章列表" class="cBlack">最新更新</a>
                                                <div class="clear"></div>
                    </dt>
                    <dd class="cont1">php中文网:公益在线php培训,帮助PHP学习者快速成长!</dd>
                    <dd class="cont2">
                      <span class="ylwTopBox">
                        <a   href="javascript:;"  class="cBlack"><b class="icon1"></b>关注服务号</a>
                        <em style="display:none;" class="ylwTopSub">
                          <p>微信扫码<br/>关注PHP中文网服务号</p>
                          <img src="/static/images/examples/text16.png"/>
                        </em>
                      </span>
                        <span class="ylwTopBox">
                        <a   href="tencent://message/?uin=27220243&Site=www.php.cn&Menu=yes"  class="cBlack"><b class="icon2"></b>技术交流群</a>
                        <em style="display:none;" class="ylwTopSub">
                          <p>QQ扫码<br/>加入技术交流群</p>
                          <img src="/static/images/examples/text18.png"/>
                        </em>
                      </span>
                        <div class="clear"></div>
                    </dd>
                </dl>
                
            </div>
            <div class="phpFootRight">
                <div class="phpFootMsg">
                    <span><img src="/static/images/examples/text17.png"/></span>
                    <dl>
                        <dt>PHP中文网订阅号</dt>
                        <dd>每天精选资源文章推送</dd>
                    </dl>
                </div>
            </div>
        </div>
    </div>
    <div class="phpFootCode">
        <div class="phpFootCodeIn"><p>Copyright 2014-2026 <a   href="https://www.php.cn/" >https://www.php.cn/</a> All Rights Reserved | php.cn | <a   href="https://beian.miit.gov.cn/" rel="nofollow" >湘ICP备2023035733号</a></p><a   href="http://www.beian.gov.cn/portal/index.do" rel="nofollow" ><b></b></a></div>
    </div>
</div>
<input type="hidden" id="verifycode" value="/captcha.html">
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?c0e685c8743351838d2a7db1c49abd56";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script>

<span class="layui-hide"><script type="text/javascript" src="https://s4.cnzz.com/z_stat.php?id=1280886301&web_id=1280886301"></script></span>

<script src="/static/js/cdn.js?v=1.0.1"></script>



	<!--底部 end-->
	<!-- content -->
	<!--
    <div class="phpFudong">
        <div class="phpFudongIn">
            <div class="phpFudongImg"></div>
            <div class="phpFudongXue">登录PHP中文网,和优秀的人一起学习!</div>
            <div class="phpFudongQuan">全站<span>2000+</span>教程免费学</div>
            <div class="phpFudongCode"><a   href="javascript:;" id="login" title="微信扫码登录">微信扫码登录</a></div>
            <div class="phpGuanbi" onclick="$('.phpFudong').hide();"></div>
            <div class="clear"></div>
        </div>
    </div>
-->	<!--底部浮动层 end-->
	<!--侧导航-->
	<style>
    .layui-fixbar{display: none;}
</style>
<div class="phpSdhBox" style="height:240px !important;">
    <li>
        <div class="phpSdhIn">
            <div class="phpSdhTitle">
                <a   href="/k24.html"  class="hover" title="PHP学习">
                    <b class="icon1"></b>
                    <p>PHP学习</p>
                </a>
            </div>
        </div>
    </li>
    <li>
        <div class="phpSdhIn">
            <div class="phpSdhTitle">
                <a   href="https://www.php.cn/blog/detail/1047189.html" >
                    <b class="icon2"></b>
                    <p>技术支持</p>
                </a>
            </div>
        </div>
    </li>
    <li>
        <div class="phpSdhIn">
            <div class="phpSdhTitle">
                <a   href="#">
                    <b class="icon6"></b>
                    <p>返回顶部</p>
                </a>
            </div>
        </div>
    </li>
</div>
	</body>

</html>

<script type="text/javascript" src="/hitsUp?type=article&id=494710&time=1769367418">
</script>
<script src="/static/ueditor/third-party/SyntaxHighlighter/shCore.js?1769367418"></script>
<script>
	article_status = "266796";
</script>
<input type="hidden" id="verifycode" value="/captcha.html">
<script type="text/javascript" src="/static/js/global.min.js?5.5.33"></script>
<link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' />
<script type='text/javascript' src='/static/js/viewer.min.js?1'></script>
<script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script>
<script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
<script>var _hmt = _hmt || [];(function(){var hm = document.createElement("script");hm.src="//hm.baidu.com/hm.js?c0e685c8743351838d2a7db1c49abd56";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();(function(){var bp = document.createElement('script');var curProtocol = window.location.protocol.split(':')[0];if(curProtocol === 'https'){bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';}else{bp.src = 'http://push.zhanzhang.baidu.com/push.js';};var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(bp, s);})();</script>
	

<script>
	function setCookie(name, value, iDay) { //name相当于键,value相当于值,iDay为要设置的过期时间(天)
		var oDate = new Date();
		oDate.setDate(oDate.getDate() + iDay);
		document.cookie = name + '=' + value + ';path=/;domain=.php.cn;expires=' + oDate;
	}

	function getCookie(name) {
		var cookieArr = document.cookie.split(";");
		for (var i = 0; i < cookieArr.length; i++) {
			var cookiePair = cookieArr[i].split("=");
			if (name == cookiePair[0].trim()) {
				return decodeURIComponent(cookiePair[1]);
			}
		}
		return null;
	}
</script>


<!-- Matomo -->
<script>
	var _paq = window._paq = window._paq || [];
	/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
	_paq.push(['trackPageView']);
	_paq.push(['enableLinkTracking']);
	(function () {
		var u = "https://tongji.php.cn/";
		_paq.push(['setTrackerUrl', u + 'matomo.php']);
		_paq.push(['setSiteId', '11']);
		var d = document,
			g = d.createElement('script'),
			s = d.getElementsByTagName('script')[0];
		g.async = true;
		g.src = u + 'matomo.js';
		s.parentNode.insertBefore(g, s);
	})();
</script>
<!-- End Matomo Code -->

<script>
	setCookie('is_article', 1, 1);
</script>

<script>
	var is_login = "0";
        var show = 0;
        var ceng = getCookie('ceng');
        //未登录复制显示登录按钮
        if(is_login == 0 && false){
            $(".code").hover(function(){
                $(this).find('.contentsignin').show();
            },function(){
                $(this).find('.contentsignin').hide();
            });
            //不给复制
            $('.code').bind("cut copy paste",function(e) {
                e.preventDefault();
            });
            $('.code .contentsignin').click(function(){
                $(document).trigger("api.loginpopbox");
            })
        }else{
            // 获取所有的 <pre> 元素
            var preElements = document.querySelectorAll('pre');
            preElements.forEach(function(preElement) {
                // 创建复制按钮
                var copyButton = document.createElement('button');
                copyButton.className = 'copy-button';
                copyButton.textContent = '复制';
                // 添加点击事件处理程序
                copyButton.addEventListener('click', function() {
                    // 获取当前按钮所属的 <pre> 元素中的文本内容
                    var textContent = preElement.textContent.trim();
                    // 创建一个临时 textarea 元素并设置其值为 <pre> 中的文本内容
                    var tempTextarea = document.createElement('textarea');
                    tempTextarea.value = textContent;
                    // 将临时 textarea 添加到文档中
                    document.body.appendChild(tempTextarea);
                    // 选中临时 textarea 中的文本内容并执行复制操作
                    tempTextarea.select();
                    document.execCommand('copy');
                    // 移除临时 textarea 元素
                    document.body.removeChild(tempTextarea);
                    // 更新按钮文本为 "已复制"
                    this.textContent = '已复制';
                });

                // 创建AI写代码按钮
                var aiButton = document.createElement('button');
                aiButton.className = 'copy-button';
                aiButton.textContent = 'AI写代码';
                aiButton.style.marginLeft = '5px';
                aiButton.style.marginRight = '5px';
                // 添加点击事件处理程序
                aiButton.addEventListener('click', function() {
                // Generate a random number between 0 and 1
                        var randomChance = Math.random();

                    // If the random number is less than 0.5, open the first URL, else open the second
                    if (randomChance < 0.5) {
                        window.open('https://www.doubao.com/chat/coding?channel=php&source=hw_db_php', '_blank');
                    } else {
                        window.open('https://click.aliyun.com/m/1000402709/', '_blank');
                    }
                });

                // 将按钮添加到 <pre> 元素前面
                preElement.parentNode.insertBefore(copyButton, preElement);
                preElement.parentNode.insertBefore(aiButton, preElement);
        });
        }
</script>