0

0

在PHP中实现如何解析和生成RSS和ATOM资源

PHPz

PHPz

发布时间:2023-07-29 16:21:50

|

1061人浏览过

|

来源于php中文网

原创

在php中实现如何解析和生成rss和atom资源

RSS和ATOM是两种常用的Web订阅格式,它们提供了一种简单的方式来发布和订阅信息源。在使用PHP开发Web应用程序时,我们经常需要解析和生成这些资源以提供给用户。本文将介绍如何使用PHP解析和生成RSS和ATOM资源,并提供相关的代码示例。

一、解析RSS和ATOM资源

PHP提供了一些内置的函数和类来解析RSS和ATOM资源,我们可以使用这些工具来获取和处理这些资源的内容。下面是一个示例代码,演示了如何解析一个RSS资源:

$rssUrl = 'https://example.com/rss.xml';

// 创建一个XML解析器
$xmlParser = xml_parser_create();

// 设置XML解析器的选项
xml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($xmlParser, XML_OPTION_SKIP_WHITE, 1);

// 定义处理开始标签的回调函数
function startElement($parser, $name, $attrs)
{
    // 在这里处理开始标签
}

// 定义处理结束标签的回调函数
function endElement($parser, $name)
{
    // 在这里处理结束标签
}

// 定义处理元素内容的回调函数
function characterData($parser, $data)
{
    // 在这里处理元素内容
}

// 设置回调函数
xml_set_element_handler($xmlParser, "startElement", "endElement");
xml_set_character_data_handler($xmlParser, "characterData");

// 打开RSS资源
$rssFile = fopen($rssUrl, 'r');

// 逐行读取RSS资源内容,并解析
while ($data = fread($rssFile, 4096)) {
    xml_parse($xmlParser, $data, feof($rssFile));
}

// 关闭RSS资源和XML解析器
fclose($rssFile);
xml_parser_free($xmlParser);

以上代码中,我们首先使用xml_parser_create函数创建了一个XML解析器,然后使用xml_parser_set_option函数设置解析器的选项,包括大小写敏感和跳过空白等。接着,我们定义了三个回调函数startElementendElementcharacterData,分别在解析开始标签、结束标签和元素内容时被调用。最后,我们使用xml_set_element_handlerxml_set_character_data_handler函数设置了回调函数,并使用xml_parse函数逐行读取RSS资源并解析。

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

类似地,我们也可以使用SimpleXMLElement类来解析RSS和ATOM资源。以下是一个使用SimpleXMLElement类解析ATOM资源的示例代码:

$atomUrl = 'https://example.com/atom.xml';

// 创建一个SimpleXMLElement实例
$atom = new SimpleXMLElement($atomUrl, null, true);

// 遍历ATOM资源中的每个条目
foreach ($atom->entry as $entry) {
    // 在这里处理每个条目
}

在这个示例中,我们通过new SimpleXMLElement创建了一个SimpleXMLElement对象,并将ATOM资源的URL作为构造函数的参数传入。然后,我们可以直接通过对象的成员属性和方法访问和处理ATOM资源的内容。

二、生成RSS和ATOM资源

PHP5 和 MySQL 圣经
PHP5 和 MySQL 圣经

本书是全面讲述PHP与MySQL的经典之作,书中不但全面介绍了两种技术的核心特性,还讲解了如何高效地结合这两种技术构建健壮的数据驱动的应用程序。本书涵盖了两种技术新版本中出现的最新特性,书中大量实际的示例和深入的分析均来自于作者在这方面多年的专业经验,可用于解决开发者在实际中所面临的各种挑战。

下载

除了解析外,PHP还提供了一些函数和库来生成RSS和ATOM资源。我们可以使用这些工具来构建符合规范的资源,并将其输出为字符串或文件。下面是一个示例代码,演示了如何生成一个包含两个条目的RSS资源:

// 创建一个DOMDocument实例,用于生成XML
$dom = new DOMDocument('1.0', 'utf-8');

// 创建根节点
$rss = $dom->createElement('rss');
$rss->setAttribute('version', '2.0');
$dom->appendChild($rss);

// 创建节点,并添加到节点中
$channel = $dom->createElement('channel');
$rss->appendChild($channel);

// 添加节点到<channel>节点
$title = $dom->createElement('title', 'My RSS Feed');
$channel->appendChild($title);

// 添加<item>节点到<channel>节点
$item1 = $dom->createElement('item');
$channel->appendChild($item1);

// 添加<title>节点到<item>节点
$item1Title = $dom->createElement('title', 'Item 1');
$item1->appendChild($item1Title);

// 添加<item>节点到<channel>节点
$item2 = $dom->createElement('item');
$channel->appendChild($item2);

// 添加<title>节点到<item>节点
$item2Title = $dom->createElement('title', 'Item 2');
$item2->appendChild($item2Title);

// 输出XML
$xml = $dom->saveXML();
echo $xml;</pre><p>以上代码中,我们首先创建了一个<code>DOMDocument</code>实例,这个实例将用于生成XML。然后,我们创建了相应的节点,并使用<code>appendChild</code>方法将它们添加到对应的父节点中。最后,我们使用<code>saveXML</code>方法将生成的XML保存到字符串中,通过<code>echo</code>输出。</p>
<p>类似地,我们也可以使用<code>SimpleXMLElement</code>类来生成RSS和ATOM资源。以下是一个使用<code>SimpleXMLElement</code>类生成一个包含两个条目的ATOM资源的示例代码:</p><pre class='brush:php;toolbar:false;'>// 创建一个SimpleXMLElement实例
$atom = new SimpleXMLElement('<feed></feed>');

// 添加<title>元素
$atom->addChild('title', 'My Atom Feed');

// 添加<entry>元素
$entry1 = $atom->addChild('entry');
$entry1->addChild('title', 'Entry 1');

// 添加<entry>元素
$entry2 = $atom->addChild('entry');
$entry2->addChild('title', 'Entry 2');

// 输出XML
$xml = $atom->asXML();
echo $xml;</pre><p>在这个示例中,我们通过<code>new SimpleXMLElement</code>创建了一个<code>SimpleXMLElement</code>对象,并传入一个包含根节点的XML字符串作为构造函数的参数。然后,我们使用对象的成员方法<code>addChild</code>来添加各级节点,并设置节点的内容。最后,使用<code>asXML</code>方法将生成的XML保存到字符串中,并通过<code>echo</code>输出。</p>
<p>总结:</p>
<p>本文介绍了如何在PHP中使用不同的方式解析和生成RSS和ATOM资源。通过解析RSS和ATOM资源,我们可以获取并处理其中的内容。通过生成RSS和ATOM资源,我们可以创建符合规范的资源,并将其提供给用户。在实际应用开发中,我们可以根据具体需求选择使用相应的方法和工具来处理和生成这些资源。</p>					</div>
					<div class="artmoreart ">
													<div class="artdp artptit"><span></span>
								<p>相关文章</p>
							</div>
							<div class="artmores flexColumn">
																	<a class="artmrlis flexRow" href="/faq/1806530.html" title="php源码怎么编译_php源码编译环境与执行流程"><b></b>
										<p class="overflowclass">php源码怎么编译_php源码编译环境与执行流程</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/1803023.html" title="PHP核心架构是什么"><b></b>
										<p class="overflowclass">PHP核心架构是什么</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/1791472.html" title="php Zend引擎如何执行代码"><b></b>
										<p class="overflowclass">php Zend引擎如何执行代码</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/1742452.html" title="PHP中“Undefined variable”错误解析与条件变量初始化策略"><b></b>
										<p class="overflowclass">PHP中“Undefined variable”错误解析与条件变量初始化策略</p>
									</a>
																	<a class="artmrlis flexRow" href="/faq/1730501.html" title="php网站前端资源异步加载怎么优化提升_php网站异步JS加载与页面渲染性能优化方法"><b></b>
										<p class="overflowclass">php网站前端资源异步加载怎么优化提升_php网站异步JS加载与页面渲染性能优化方法</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="/search?q=php" target="_blank">php</a> <a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/search?q=echo" target="_blank">echo</a> <a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/search?q=构造函数" target="_blank">构造函数</a> <a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/search?q=xml" target="_blank">xml</a> <a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/search?q=回调函数" target="_blank">回调函数</a> <a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/search?q=字符串" target="_blank">字符串</a> <a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/search?q=对象" target="_blank">对象</a> <a class="mtbsa flexRow" onclick="hits_log(2,'www',this);" href-data="/search?q=atom" target="_blank">atom</a>								</div>
							</div>
						
						<p class="statement">本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn</p>
						<div class="lastanext flexRow">
													<a class="lastart flexRow" href="/faq/585093.html" title="使用CakePHP框架实现图片上传和显示的步骤"><span>上一篇:</span>使用CakePHP框架实现图片上传和显示的步骤</a>
													<a class="nextart flexRow" href="/faq/585096.html" title="如何使用PHP和Exif扩展来读取照片的焦平面成像尺寸"><span>下一篇:</span>如何使用PHP和Exif扩展来读取照片的焦平面成像尺寸</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/1512329.html" title="如何让你的电商前端快如闪电:SprykerTouch模块与Composer助力数据同步挑战"><b></b>
												<p class="overflowclass">如何让你的电商前端快如闪电:SprykerTouch模块与Composer助力数据同步挑战</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-12 09:46</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1512556.html" title="如何解决复杂应用中动态URL和重定向管理难题,使用spryker/url模块轻松搞定"><b></b>
												<p class="overflowclass">如何解决复杂应用中动态URL和重定向管理难题,使用spryker/url模块轻松搞定</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-12 10:39</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1513086.html" title="如何在Spryker项目中实现前端与后端高效通信?Spryker/Zed-Request与Composer助你轻松连接!"><b></b>
												<p class="overflowclass">如何在Spryker项目中实现前端与后端高效通信?Spryker/Zed-Request与Composer助你轻松连接!</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-12 12:40</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1515204.html" title="如何高效生成唯一ID?Ramsey/Uuid助你解决分布式系统中的ID难题"><b></b>
												<p class="overflowclass">如何高效生成唯一ID?Ramsey/Uuid助你解决分布式系统中的ID难题</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-13 09:51</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1520364.html" title="Yii2数据库迁移总是手动写?insolita/yii2-migration-generator助你告别繁琐,实现自动化!"><b></b>
												<p class="overflowclass">Yii2数据库迁移总是手动写?insolita/yii2-migration-generator助你告别繁琐,实现自动化!</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-15 09:38</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1520421.html" title="如何解决复杂系统可视化难题,Spryker/Graphviz助你轻松绘制依赖与状态图"><b></b>
												<p class="overflowclass">如何解决复杂系统可视化难题,Spryker/Graphviz助你轻松绘制依赖与状态图</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-15 09:52</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1523515.html" title="如何高效生成订单/发票号?SprykerSequenceNumber模块助你轻松搞定"><b></b>
												<p class="overflowclass">如何高效生成订单/发票号?SprykerSequenceNumber模块助你轻松搞定</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-16 10:01</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1524116.html" title="如何解决电商平台商品属性管理混乱的问题,使用SprykerProductAttribute模块助你实现灵活高效的数据管理"><b></b>
												<p class="overflowclass">如何解决电商平台商品属性管理混乱的问题,使用SprykerProductAttribute模块助你实现灵活高效的数据管理</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-09-16 12:23</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1611539.html" title="解锁夸克浏览器AI搜索新功能_掌握夸克AI搜索的进阶玩法"><b></b>
												<p class="overflowclass">解锁夸克浏览器AI搜索新功能_掌握夸克AI搜索的进阶玩法</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-10-13 17:08</p>
											</div>
										</div>
								</div>
																	<div class="authlist flexColumn">
										<div class="autharts flexRow">
											<a class="autharta flexRow " href="/faq/1661043.html" title="升级夸克浏览器体验AI搜索_夸克AI搜索核心功能深度解析"><b></b>
												<p class="overflowclass">升级夸克浏览器体验AI搜索_夸克AI搜索核心功能深度解析</p>
											</a>
											<div class="authtime flexRow"><b></b>
												<p>2025-10-28 20: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/office/pdf" title="PDF 文档" class="aidcontbp flexRow flexcenter">PDF 文档</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/phpwjzmdk" class="aClass flexRow hotzta" title="php文件怎么打开"><img
										src="https://img.php.cn/upload/subject/202309/01/2023090111533461500.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/phpwjzmdk" class="aClass flexRow hotztra overflowclass" title="php文件怎么打开">php文件怎么打开</a>
									<p class="aClass flexRow hotztrp overflowclass">打开php文件步骤:1、选择文本编辑器;2、在选择的文本编辑器中,创建一个新的文件,并将其保存为.php文件;3、在创建的PHP文件中,编写PHP代码;4、要在本地计算机上运行PHP文件,需要设置一个服务器环境;5、安装服务器环境后,需要将PHP文件放入服务器目录中;6、一旦将PHP文件放入服务器目录中,就可以通过浏览器来运行它。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">1924</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.09.01</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phpzmqcszys" class="aClass flexRow hotzta" title="php怎么取出数组的前几个元素"><img
										src="https://img.php.cn/upload/subject/202310/11/2023101111394597302.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/phpzmqcszys" class="aClass flexRow hotztra overflowclass" title="php怎么取出数组的前几个元素">php怎么取出数组的前几个元素</a>
									<p class="aClass flexRow hotztrp overflowclass">取出php数组的前几个元素的方法有使用array_slice()函数、使用array_splice()函数、使用循环遍历、使用array_slice()函数和array_values()函数等。本专题为大家提供php数组相关的文章、下载、课程内容,供大家免费下载体验。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">1262</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.10.11</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phpfxlsb" class="aClass flexRow hotzta" title="php反序列化失败怎么办"><img
										src="https://img.php.cn/upload/subject/202310/11/2023101111442515737.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/phpfxlsb" class="aClass flexRow hotztra overflowclass" title="php反序列化失败怎么办">php反序列化失败怎么办</a>
									<p class="aClass flexRow hotztrp overflowclass">php反序列化失败的解决办法检查序列化数据。检查类定义、检查错误日志、更新PHP版本和应用安全措施等。本专题为大家提供php反序列化相关的文章、下载、课程内容,供大家免费下载体验。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">1168</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.10.11</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phpljmssql" class="aClass flexRow hotzta" title="php怎么连接mssql数据库"><img
										src="https://img.php.cn/upload/subject/202310/23/2023102311474720631.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="php怎么连接mssql数据库" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/phpljmssql" class="aClass flexRow hotztra overflowclass" title="php怎么连接mssql数据库">php怎么连接mssql数据库</a>
									<p class="aClass flexRow hotztrp overflowclass">连接方法:1、通过mssql_系列函数;2、通过sqlsrv_系列函数;3、通过odbc方式连接;4、通过PDO方式;5、通过COM方式连接。想了解php怎么连接mssql数据库的详细内容,可以访问下面的文章。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">948</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.10.23</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phpljmssqlsjk" class="aClass flexRow hotzta" title="php连接mssql数据库的方法"><img
										src="https://img.php.cn/upload/subject/202310/23/2023102312044461242.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="php连接mssql数据库的方法" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/phpljmssqlsjk" class="aClass flexRow hotztra overflowclass" title="php连接mssql数据库的方法">php连接mssql数据库的方法</a>
									<p class="aClass flexRow hotztrp overflowclass">php连接mssql数据库的方法有使用PHP的MSSQL扩展、使用PDO等。想了解更多php连接mssql数据库相关内容,可以阅读本专题下面的文章。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">1399</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.10.23</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/htmlzmsc" class="aClass flexRow hotzta" title="html怎么上传"><img
										src="https://img.php.cn/upload/subject/202311/03/2023110309571979057.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="html怎么上传" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/htmlzmsc" class="aClass flexRow hotztra overflowclass" title="html怎么上传">html怎么上传</a>
									<p class="aClass flexRow hotztrp overflowclass">html通过使用HTML表单、JavaScript和PHP上传。更多关于html的问题详细请看本专题下面的文章。php中文网欢迎大家前来学习。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">1229</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.11.03</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phpcxlmzmjj" class="aClass flexRow hotzta" title="PHP出现乱码怎么解决"><img
										src="https://img.php.cn/upload/subject/202311/09/2023110909430246458.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/phpcxlmzmjj" class="aClass flexRow hotztra overflowclass" title="PHP出现乱码怎么解决">PHP出现乱码怎么解决</a>
									<p class="aClass flexRow hotztrp overflowclass">PHP出现乱码可以通过修改PHP文件头部的字符编码设置、检查PHP文件的编码格式、检查数据库连接设置和检查HTML页面的字符编码设置来解决。更多关于php乱码的问题详情请看本专题下面的文章。php中文网欢迎大家前来学习。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">1439</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.11.09</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/phpwjzmzsjsdk" class="aClass flexRow hotzta" title="php文件怎么在手机上打开"><img
										src="https://img.php.cn/upload/subject/202311/13/2023111311092751784.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/phpwjzmzsjsdk" class="aClass flexRow hotztra overflowclass" title="php文件怎么在手机上打开">php文件怎么在手机上打开</a>
									<p class="aClass flexRow hotztrp overflowclass">php文件在手机上打开需要在手机上搭建一个能够运行php的服务器环境,并将php文件上传到服务器上。再在手机上的浏览器中输入服务器的IP地址或域名,加上php文件的路径,即可打开php文件并查看其内容。更多关于php相关问题,详情请看本专题下面的文章。php中文网欢迎大家前来学习。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">1303</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2023.11.13</p>
										</div>
									</div>
								</div>
							</div>
													<div class="hotztlls flexRow">
								<a target="_blank" href="/faq/zmwjwzjs" class="aClass flexRow hotzta" title="桌面文件位置介绍"><img
										src="https://img.php.cn/upload/subject/202512/30/2025123017413242601.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="桌面文件位置介绍" class="hotztaimg"
										onerror="this.src='/static/lhimages/moren/morentu.png'"></a>
								<div class="hotztright flexColumn">
									<a target="_blank" href="/faq/zmwjwzjs" class="aClass flexRow hotztra overflowclass" title="桌面文件位置介绍">桌面文件位置介绍</a>
									<p class="aClass flexRow hotztrp overflowclass">本专题整合了桌面文件相关教程,阅读专题下面的文章了解更多内容。</p>
									<div class="hotztrdown flexRow">
										<div class="htztdsee flexRow"> <b></b>
											<p class="">0</p>
										</div>
										<div class="htztdTime flexRow"> <b></b>
											<p>2025.12.30</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="CSS3新浪微博模板商店图片抖动特效" href="/xiazai/js/8183"><span>[图片特效]</span><span>CSS3新浪微博模板商店图片抖动特效</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="全屏光晕背景纯css3下拉菜单导航" href="/xiazai/js/8182"><span>[菜单导航]</span><span>全屏光晕背景纯css3下拉菜单导航</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery企业开户表单验证代码" href="/xiazai/js/8181"><span>[表单按钮]</span><span>jQuery企业开户表单验证代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery学习名额大转盘抽奖代码" href="/xiazai/js/8180"><span>[窗口特效]</span><span>jQuery学习名额大转盘抽奖代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="css水果tab选项卡切换特效" href="/xiazai/js/8179"><span>[选项卡TAB]</span><span>css水果tab选项卡切换特效</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="js+css3实现3D骰子特效" href="/xiazai/js/8178"><span>[图片特效]</span><span>js+css3实现3D骰子特效</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="js侧边隐藏菜单收缩特效" href="/xiazai/js/8177"><span>[菜单导航]</span><span>js侧边隐藏菜单收缩特效</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery侧边悬浮的客服菜单代码" href="/xiazai/js/8176"><span>[窗口特效]</span><span>jQuery侧边悬浮的客服菜单代码</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="Canvas表单焦点圆点交互特效" href="/xiazai/js/8175"><span>[表单按钮]</span><span>Canvas表单焦点圆点交互特效</span></a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" title="jQuery实现彩虹文字效果 jQuery实现彩虹文字效果网页特效" href="/xiazai/js/8174"><span>[文字特效]</span><span>jQuery实现彩虹文字效果 jQuery实现彩虹文字效果网页特效</span></a>
									</div>
								</li>
													</ul>
						<ul class="twof" style="display:none;">
															<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>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11345" title="CODEC2I 众筹系统"><span>[电商源码]</span><span>CODEC2I 众筹系统</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/code/11344" title="ieshop超级网店系统"><span>[电商源码]</span><span>ieshop超级网店系统</span> </a>
									</div>
								</li>
													</ul>
						<ul class="threef" style="display:none;">
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4141" title="国潮中式锦鲤荷塘矢量背景"><span>[网站素材]</span><span>国潮中式锦鲤荷塘矢量背景</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4140" title="复古红色咖啡促销海报矢量模板"><span>[网站素材]</span><span>复古红色咖啡促销海报矢量模板</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4139" title="2026新年快乐竖版海报PSD模板设计下载"><span>[网站素材]</span><span>2026新年快乐竖版海报PSD模板设计下载</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4138" title="孟菲斯几何2026新年贺卡矢量"><span>[网站素材]</span><span>孟菲斯几何2026新年贺卡矢量</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4137" title="珠宝饰品折扣感谢卡ps素材下载"><span>[网站素材]</span><span>珠宝饰品折扣感谢卡ps素材下载</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4136" title="2026新年创意剪影海报矢量素材"><span>[网站素材]</span><span>2026新年创意剪影海报矢量素材</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4135" title="极简线条女子美容护肤矢量素材"><span>[网站素材]</span><span>极简线条女子美容护肤矢量素材</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4134" title="2026年日历表设计源文件下载"><span>[网站素材]</span><span>2026年日历表设计源文件下载</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4133" title="欧式复古西餐厅菜单设计矢量"><span>[网站素材]</span><span>欧式复古西餐厅菜单设计矢量</span> </a>
									</div>
								</li>
															<li>
									<div class="wzrfourli flexRow">
										<b></b>
										<a target="_blank" href="/xiazai/sucai/4132" 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="PHP5 和 MySQL 圣经" href="/xiazai/learn/2587">PHP5 和 MySQL 圣经</a></div>
											<div class="xgwzlid flexRow"><b></b><a target="_blank" title="PHP与MySQL程序设计3" href="/xiazai/learn/2529">PHP与MySQL程序设计3</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>

						<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课时 | 6.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课时 | 150.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.3万人学习</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课时 | 0.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课时 | 6.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.8万人学习</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 命名空间中正确使用全局命名空间下的外部类" href="/faq/1912133.html">如何在 PHP 命名空间中正确使用全局命名空间下的外部类</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="phpstudy和xampp哪个好用_本地部署选phpstudy还是xampp对比【解答】" href="/faq/1912074.html">phpstudy和xampp哪个好用_本地部署选phpstudy还是xampp对比【解答】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="php做exe能调用python脚本吗_跨语言交互实现方法【指南】" href="/faq/1912073.html">php做exe能调用python脚本吗_跨语言交互实现方法【指南】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="php读取gpio状态怎么弄_php获取树莓派gpio引脚电平【方法】" href="/faq/1912072.html">php读取gpio状态怎么弄_php获取树莓派gpio引脚电平【方法】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="php文件怎么变mp4上传_php视频文件上传到平台方法【操作】" href="/faq/1912071.html">php文件怎么变mp4上传_php视频文件上传到平台方法【操作】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="php485怎么实现断线重连_php485连接稳定性保障方案【方法】" href="/faq/1912070.html">php485怎么实现断线重连_php485连接稳定性保障方案【方法】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="PHP主流架构如何处理高并发_优化策略汇总【技巧】" href="/faq/1912069.html">PHP主流架构如何处理高并发_优化策略汇总【技巧】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="短链接还原php报错500_查看服务器错误日志找原因【解答】" href="/faq/1912067.html">短链接还原php报错500_查看服务器错误日志找原因【解答】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="php转exe用什么工具好_主流php打包工具对比推荐【汇总】" href="/faq/1912066.html">php转exe用什么工具好_主流php打包工具对比推荐【汇总】</a></div>
													<div class="xgwzlid flexRow"><b></b><a target="_blank" title="php在Mac怎么配置_使用Homebrew安装PHP及相关扩展说明【说明】" href="/faq/1912065.html">php在Mac怎么配置_使用Homebrew安装PHP及相关扩展说明【说明】</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-2025 <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=585094&time=1767108821">
</script>
<script src="/static/ueditor/third-party/SyntaxHighlighter/shCore.js?1767108821"></script>
<script>
	article_status = "164";
</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>