0

0

PHP语言开发Paypal支付demo的具体实现

php中文网

php中文网

发布时间:2016-06-13 08:53:39

|

1817人浏览过

|

来源于php中文网

原创

PHP语言开发Paypal支付demo的具体实现

一、开发前准备

https://developer.paypal.com/  到paypal的开发者官网注册开发者账号。

用账号登录之后、点击导航上面的 dashboard、进入dashboard面版。如下截图、后续的操作都是在这个面板中操作。

上面截图中菜单 Sandbox下面的Accounts里面能看到你的 sandbox测试的买家账号和卖家账号。2个测试账号里面都有profile选项里面有changepassword可以设置虚拟账号的密码。

上面截图中菜单Sandbox下面的Transactions就是你的交易记录。

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

点击截图页面右上角的 Create App按钮。创建一个应用。创建好后、会给你提供一个Client ID 和 Secret。这两个可以配置为php常量后面开发中会用到。

二、进入支付Demo开发

随便在本地建立一个开发代码根目录、先建立一个index.html里面就放一个简单的产品名称和产品价格两个input项即可、代码和截图如下:

  1. DOCTYPE html>
  2. "en">
  3. "utf-8">
  4. 支付页面title> </span></li><li><span> head> </span></li><li class="alt"><span> <body> </span></li><li><span> <div> </span></li><li class="alt"><span> <form action=<span class="string">"checkout.php"</span><span> method=</span><span class="string">"post"</span><span> autocomplete=</span><span class="string">"off"</span><span>> </span></span></li><li><span> <label <span class="keyword">for</span><span>=</span><span class="string">"item"</span><span>> </span></span></li><li class="alt"><span> 产品名称 </span></li><li><span> <input type=<span class="string">"text"</span><span> name=</span><span class="string">"product"</span><span>> </span></span></li><li class="alt"><span> label> </span></li><li><span> <br> </span></li><li class="alt"><span> <label <span class="keyword">for</span><span>=</span><span class="string">"amount"</span><span>> </span></span></li><li><span> 价格 </span></li><li class="alt"><span> <input type=<span class="string">"text"</span><span> name=</span><span class="string">"price"</span><span>> </span></span></li><li><span> label> </span></li><li class="alt"><span> <br> </span></li><li><span> <input type=<span class="string">"submit"</span><span> value=</span><span class="string">"去付款"</span><span>> </span></span></li><li class="alt"><span> form> </span></li><li><span> div> </span></li><li class="alt"><span> body> </span></li><li><span>html> </span></li></ol></pre> <p style="text-align: center;"></p> <p>输入产品名称 和 价格。点击去付款就会到paypal的付款页面。用你的sandbox测试买家账号去付款。就会发现付款成功。然后登陆你的测试卖家账号。会发现卖家账号已经收到付款。当然这里会扣除paypal收取的手续费。手续费收的是卖家的。</p> <p>下面来具体看看php是怎么实现的。首先先要把paypal提供的 php-sdk给弄到你的代码目录中来。这里介绍使用php的包管理器composer来获取最新sdk、当然你可以可以从github等其他渠道获取最新的paypal php-sdk。</p> <p>默认你的电脑已经安装composer了。如果没有自己去度娘或者google下composer安装。</p><div class="aritcle_card flexRow"> <div class="artcardd flexRow"> <a class="aritcle_card_img" href="/xiazai/code/11174" title="天天团购系统"><img src="https://img.php.cn/upload/webcode/000/000/009/176520600832184.jpg" alt="天天团购系统"></a> <div class="aritcle_card_info flexColumn"> <a href="/xiazai/code/11174" title="天天团购系统">天天团购系统</a> <p>天天团购系统是一套强大的开源团购程序,采用PHP+mysql开发,系统内置支付宝、财付通、GOOGLE地图等接口,支持短信发送团购券和实物团购快递发货等;另外可通过Ucenter模块,与网站已有系统无缝整合,实现用户同步注册、登陆、退出。 天天团购系统是一套创新的开源团购程序,拥有多达10项首创功能,同时支持虚拟和实物团购,内置类似淘宝的快递配送体系,并提供强大的抽奖、邀请返利等营销功能,让您轻松</p> </div> <a href="/xiazai/code/11174" title="天天团购系统" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a> </div> </div> <p>然后在你的代码根目录写一个composer.json文件来获取包内容。json文件代码如下: </p> <p><span style="line-height: 1.5 !important;">{<br>     </span>"require" :<span style="line-height: 1.5 !important;"> { </span>"paypal/rest-api-sdk-php" : "1.5.1"<span style="line-height: 1.5 !important;"><br>     }<br> }</span></p> <p>这里如果是 linux/unix系统就直接再根目录执行composer install来获取包内容。</p> <p>安装好之后。根目录下面会产生一个vendor目录。里面有composer 和 paypal两个子目录。composer里面实现了自动加载、paypal则是你的sdk内容。</p> <p>接 下来我们来写一个公共文件这里默认用 app/start.php、你的项目中可以自定义)、其实里面就只是实现了 sdk的autoload.php自动加载 和 创建刚才上面的的client id  和 secret生成的paypal支付对象实例。start.php代码如下:</p> php<br><p><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">require</span> "vendor/autoload.php"; <span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">//</span><span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">载入sdk的自动加载文件</span> <span style="color: rgb(0, 128, 128); line-height: 1.5 !important;">define</span>('SITE_URL', 'http://www.paydemo.com'); <span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">//</span><span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">网站url自行定义 //创建支付对象实例</span> <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$paypal</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> \PayPal\Rest\ApiContext( </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> \PayPal\Auth\OAuthTokenCredential( </span>'你的Client ID' '你的secret'<span style="line-height: 1.5 !important;"><br>     )<br> );</span><span class="cnblogs_code_copy" style="padding-right: 5px; line-height: 1.5 !important;"><br type="_moz"></span></p> <p>接下来就来实现表单中提交的处理文件 checkout.php。代码内容如下:</p> php <p><span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">/*</span><span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">*<br> * @author xxxxxxxx<br> * @brief 简介:<br> * @date 15/9/2<br> * @time 下午5:00<br></span><span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">*/</span><br><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\Payer;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\Item;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\ItemList;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\Details;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\Amount;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\Transaction;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\RedirectUrls;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> \PayPal\Api\Payment;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span> \PayPal\<span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">Exception</span><span style="line-height: 1.5 !important;">\PayPalConnectionException;<br><br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">require</span> "app/start.php"<span style="line-height: 1.5 !important;">; </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">if</span> (!<span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">isset</span>(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_POST</span>['product'], <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_POST</span>['price'<span style="line-height: 1.5 !important;">])) { </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">die</span>("lose some params"<span style="line-height: 1.5 !important;">); } </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$product</span> = <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_POST</span>['product'<span style="line-height: 1.5 !important;">]; </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$price</span> = <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_POST</span>['price'<span style="line-height: 1.5 !important;">]; </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$shipping</span> = 2.00; <span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">//</span><span style="color: rgb(0, 128, 0); line-height: 1.5 !important;">运费</span> <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$total</span> = <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$price</span> + <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$shipping</span><span style="line-height: 1.5 !important;">; </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payer</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> Payer(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payer</span>->setPaymentMethod('paypal'<span style="line-height: 1.5 !important;">); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$item</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> Item(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$item</span>->setName(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$product</span><span style="line-height: 1.5 !important;">) </span>->setCurrency('USD'<span style="line-height: 1.5 !important;">) </span>->setQuantity(1<span style="line-height: 1.5 !important;">) </span>->setPrice(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$price</span><span style="line-height: 1.5 !important;">); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$itemList</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> ItemList(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$itemList</span>->setItems([<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$item</span><span style="line-height: 1.5 !important;">]); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$details</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> Details(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$details</span>->setShipping(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$shipping</span><span style="line-height: 1.5 !important;">) </span>->setSubtotal(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$price</span><span style="line-height: 1.5 !important;">); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$amount</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> Amount(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$amount</span>->setCurrency('USD'<span style="line-height: 1.5 !important;">) </span>->setTotal(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$total</span><span style="line-height: 1.5 !important;">) </span>->setDetails(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$details</span><span style="line-height: 1.5 !important;">); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$transaction</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> Transaction(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$transaction</span>->setAmount(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$amount</span><span style="line-height: 1.5 !important;">) </span>->setItemList(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$itemList</span><span style="line-height: 1.5 !important;">) </span>->setDescription("支付描述内容"<span style="line-height: 1.5 !important;">) </span>->setInvoiceNumber(<span style="color: rgb(0, 128, 128); line-height: 1.5 !important;">uniqid</span><span style="line-height: 1.5 !important;">()); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$redirectUrls</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> RedirectUrls(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$redirectUrls</span>->setReturnUrl(SITE_URL . '/pay.php?success=true'<span style="line-height: 1.5 !important;">) </span>->setCancelUrl(SITE_URL . '/pay.php?success=false'<span style="line-height: 1.5 !important;">); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payment</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> Payment(); </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payment</span>->setIntent('sale'<span style="line-height: 1.5 !important;">) </span>->setPayer(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payer</span><span style="line-height: 1.5 !important;">) </span>->setRedirectUrls(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$redirectUrls</span><span style="line-height: 1.5 !important;">) </span>->setTransactions([<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$transaction</span><span style="line-height: 1.5 !important;">]); </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">try</span><span style="line-height: 1.5 !important;"> { </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payment</span>->create(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$paypal</span><span style="line-height: 1.5 !important;">); } </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">catch</span> (PayPalConnectionException <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$e</span><span style="line-height: 1.5 !important;">) { </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">echo</span> <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$e</span>-><span style="line-height: 1.5 !important;">getData(); </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">die</span><span style="line-height: 1.5 !important;">(); } </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$approvalUrl</span> = <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payment</span>-><span style="line-height: 1.5 !important;">getApprovalLink(); </span><span style="color: rgb(0, 128, 128); line-height: 1.5 !important;">header</span>("Location: {<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$approvalUrl</span>}");<span class="cnblogs_code_copy" style="padding-right: 5px; line-height: 1.5 !important;"><br type="_moz"></span></p> <p>checkout.php通过表单提交上来的参数对支付具体细节和参数进行初始化和设置。这里只列出了常用的部分。paypal提供了很多参数设置。具体更丰富的可以自己参考paypal官方开发者文档。</p> <p>checkout.php设置完参数之后。会生成一个支付链接。用header跳转到这个支付链接就是paypal的支付页面)到这个支付页面上面就可以用你的sandbox提供的buyer账号去支付了。截图如下:</p> <p style="text-align: center;"></p> <p>用buyer账号支付完成之后。去看看你的sandbox的商家账户余额吧。就会发现已经收到了扣除手续费外的钱了。</p> <p>这里支付成功 或者 失败后还有一个回调的处理。回调处理的php文件再上面的checkout.php里面的setReturnUrl处设置。这里设置的是/pay.php?success=true </p> <p>接下来我们来看看pay.php是怎么简单处理回调的。先贴上pay.php的代码:</p> <p>php</p> <p><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">require</span> 'app/start.php'<span style="line-height: 1.5 !important;">;<br><br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> PayPal\Api\Payment;<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">use</span><span style="line-height: 1.5 !important;"> PayPal\Api\PaymentExecution;<br><br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">if</span>(!<span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">isset</span>(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_GET</span>['success'], <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_GET</span>['paymentId'], <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_GET</span>['PayerID'<span style="line-height: 1.5 !important;">])){<br>     </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">die</span><span style="line-height: 1.5 !important;">();<br> }<br><br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">if</span>((bool)<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_GET</span>['success']=== 'false'<span style="line-height: 1.5 !important;">){<br><br>     </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">echo</span> 'Transaction cancelled!'<span style="line-height: 1.5 !important;">;<br>     </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">die</span><span style="line-height: 1.5 !important;">();<br> }<br><br></span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$paymentID</span> = <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_GET</span>['paymentId'<span style="line-height: 1.5 !important;">];<br></span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payerId</span> = <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$_GET</span>['PayerID'<span style="line-height: 1.5 !important;">];<br><br></span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payment</span> = Payment::get(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$paymentID</span>, <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$paypal</span><span style="line-height: 1.5 !important;">);<br><br></span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$execute</span> = <span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">new</span><span style="line-height: 1.5 !important;"> PaymentExecution();<br></span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$execute</span>->setPayerId(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payerId</span><span style="line-height: 1.5 !important;">);<br><br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">try</span><span style="line-height: 1.5 !important;">{<br>     </span><span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$result</span> = <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$payment</span>->execute(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$execute</span>, <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$paypal</span><span style="line-height: 1.5 !important;">);<br> }</span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">catch</span>(<span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">Exception</span> <span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$e</span><span style="line-height: 1.5 !important;">){<br>     </span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">die</span>(<span style="color: rgb(128, 0, 128); line-height: 1.5 !important;">$e</span><span style="line-height: 1.5 !important;">);<br> }<br></span><span style="color: rgb(0, 0, 255); line-height: 1.5 !important;">echo</span> '支付成功!感谢支持!';<span class="cnblogs_code_copy" style="padding-right: 5px; line-height: 1.5 !important;"><br type="_moz"></span></p> <p>好了。到这里一个简单的paypal支付的demo其实已经走通了。懂得支付原理之后、想要再你自己的项目里面进行更丰富的扩展、就去paypal的官方文档查看更多具体的开发项设置。包括交易明细的获取等等都是可以实现的。这里就不具体讲下去了。</p> <p class="blank10"></p> <p class="blank1"></p> <hr style="border-top: #555555 1px solid; height: 1px; border-right: medium none; border-bottom: medium none; border-left: medium none"> <hr style="border-top: #555555 1px solid; height: 1px; border-right: medium none; border-bottom: medium none; border-left: medium none"> </div> <div class="artmoreart "> <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/164077.html" title="php无限极分类"><span>上一篇:</span>php无限极分类</a> <a class="nextart flexRow" href="/faq/164079.html" title="php 对问卷结果进行统计,php问卷结果统计"><span>下一篇:</span>php 对问卷结果进行统计,php问卷结果统计</a> </div> </div> <div class="artlef-down "> <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/phpymazjcdq" class="aClass flexRow hotzta" title="php源码安装教程大全"><img src="https://img.php.cn/upload/subject/202512/31/2025123115154686243.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/phpymazjcdq" 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="">7</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/phpwzymjcdq" class="aClass flexRow hotzta" title="php网站源码教程大全"><img src="https://img.php.cn/upload/subject/202512/31/2025123115111986288.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/phpwzymjcdq" 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="">4</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/spwjgs" class="aClass flexRow hotzta" title="视频文件格式"><img src="https://img.php.cn/upload/subject/202512/31/2025123114550378407.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/spwjgs" 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="">7</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/bsgnxzdllqdq" class="aClass flexRow hotzta" title="不受国内限制的浏览器大全"><img src="https://img.php.cn/upload/subject/202512/31/2025123114463515249.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/bsgnxzdllqdq" class="aClass flexRow hotztra overflowclass" title="不受国内限制的浏览器大全">不受国内限制的浏览器大全</a> <p class="aClass flexRow hotztrp overflowclass">想找真正自由、无限制的上网体验?本合集精选2025年最开放、隐私强、访问无阻的浏览器App,涵盖Tor、Brave、Via、X浏览器、Mullvad等高自由度工具。支持自定义搜索引擎、广告拦截、隐身模式及全球网站无障碍访问,部分更具备防追踪、去谷歌化、双内核切换等高级功能。无论日常浏览、隐私保护还是突破地域限制,总有一款适合你!</p> <div class="hotztrdown flexRow"> <div class="htztdsee flexRow"> <b></b> <p class="">7</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/cxslsjjffdq" class="aClass flexRow hotzta" title="出现404解决方法大全"><img src="https://img.php.cn/upload/subject/202512/31/2025123114400177727.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="出现404解决方法大全" class="hotztaimg" onerror="this.src='/static/lhimages/moren/morentu.png'"></a> <div class="hotztright flexColumn"> <a target="_blank" href="/faq/cxslsjjffdq" class="aClass flexRow hotztra overflowclass" title="出现404解决方法大全">出现404解决方法大全</a> <p class="aClass flexRow hotztrp overflowclass">本专题整合了404错误解决方法大全,阅读专题下面的文章了解更多详细内容。</p> <div class="hotztrdown flexRow"> <div class="htztdsee flexRow"> <b></b> <p class="">42</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/html5zmbfsp" class="aClass flexRow hotzta" title="html5怎么播放视频"><img src="https://img.php.cn/upload/subject/202512/31/2025123114321313861.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="html5怎么播放视频" class="hotztaimg" onerror="this.src='/static/lhimages/moren/morentu.png'"></a> <div class="hotztright flexColumn"> <a target="_blank" href="/faq/html5zmbfsp" class="aClass flexRow hotztra overflowclass" title="html5怎么播放视频">html5怎么播放视频</a> <p class="aClass flexRow hotztrp overflowclass">想让网页流畅播放视频?本合集详解HTML5视频播放核心方法!涵盖<video>标签基础用法、多格式兼容(MP4/WebM/OGV)、自定义播放控件、响应式适配及常见浏览器兼容问题解决方案。无需插件,纯前端实现高清视频嵌入,助你快速打造现代化网页视频体验。</p> <div class="hotztrdown flexRow"> <div class="htztdsee flexRow"> <b></b> <p class="">4</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/gbwinxtzdgxjc" class="aClass flexRow hotzta" title="关闭win10系统自动更新教程大全"><img src="https://img.php.cn/upload/subject/202512/31/2025123114222331548.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="关闭win10系统自动更新教程大全" class="hotztaimg" onerror="this.src='/static/lhimages/moren/morentu.png'"></a> <div class="hotztright flexColumn"> <a target="_blank" href="/faq/gbwinxtzdgxjc" class="aClass flexRow hotztra overflowclass" title="关闭win10系统自动更新教程大全">关闭win10系统自动更新教程大全</a> <p class="aClass flexRow hotztrp overflowclass">本专题整合了关闭win10系统自动更新教程大全,阅读专题下面的文章了解更多详细内容。</p> <div class="hotztrdown flexRow"> <div class="htztdsee flexRow"> <b></b> <p class="">3</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/zzdnzdazrjjc" class="aClass flexRow hotzta" title="阻止电脑自动安装软件教程"><img src="https://img.php.cn/upload/subject/202512/31/2025123114132289798.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/zzdnzdazrjjc" 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="">3</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</p> </div> </div> </div> </div> <div class="hotztlls flexRow"> <a target="_blank" href="/faq/html5zmsy" class="aClass flexRow hotzta" title="html5怎么使用"><img src="https://img.php.cn/upload/subject/202512/31/2025123114112079655.jpg?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="html5怎么使用" class="hotztaimg" onerror="this.src='/static/lhimages/moren/morentu.png'"></a> <div class="hotztright flexColumn"> <a target="_blank" href="/faq/html5zmsy" class="aClass flexRow hotztra overflowclass" title="html5怎么使用">html5怎么使用</a> <p class="aClass flexRow hotztrp overflowclass">想快速上手HTML5开发?本合集为你整理最实用的HTML5使用指南!涵盖HTML5基础语法、主流框架(如Bootstrap、Vue、React)集成方法,以及无需安装、直接在线编辑运行的平台推荐(如CodePen、JSFiddle)。无论你是新手还是进阶开发者,都能轻松掌握HTML5网页制作、响应式布局与交互功能开发,零配置开启高效前端编程之旅!</p> <div class="hotztrdown flexRow"> <div class="htztdsee flexRow"> <b></b> <p class="">2</p> </div> <div class="htztdTime flexRow"> <b></b> <p>2025.12.31</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/8204"><span>[表单按钮]</span><span>CSS3带顶部色条登录框特效</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="HTML5英文字母悬停翻转动画特效" href="/xiazai/js/8203"><span>[文字特效]</span><span>HTML5英文字母悬停翻转动画特效</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="仿商城楼层锚点页面滚动代码" href="/xiazai/js/8202"><span>[窗口特效]</span><span>仿商城楼层锚点页面滚动代码</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="CSS3用户登录表单代码" href="/xiazai/js/8201"><span>[表单按钮]</span><span>CSS3用户登录表单代码</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="jquery文章内容阅读全文查看代码" href="/xiazai/js/8200"><span>[文字特效]</span><span>jquery文章内容阅读全文查看代码</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="图片弹出imgCentering插件" href="/xiazai/js/8199"><span>[图片特效]</span><span>图片弹出imgCentering插件</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="黑色的固定导航下拉菜单ui布局" href="/xiazai/js/8198"><span>[菜单导航]</span><span>黑色的固定导航下拉菜单ui布局</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="CSS3星球旋转手机表单代码" href="/xiazai/js/8197"><span>[表单按钮]</span><span>CSS3星球旋转手机表单代码</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="炫酷的程序员个人简历文字动画代码" href="/xiazai/js/8196"><span>[文字特效]</span><span>炫酷的程序员个人简历文字动画代码</span></a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" title="网页文章索引导航预览特效" href="/xiazai/js/8195"><span>[菜单导航]</span><span>网页文章索引导航预览特效</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/4145" title="2026新年派对庆祝矢量素材"><span>[网站素材]</span><span>2026新年派对庆祝矢量素材</span> </a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" href="/xiazai/sucai/4144" title="美味冰激凌宣传卡模板设计下载"><span>[网站素材]</span><span>美味冰激凌宣传卡模板设计下载</span> </a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" href="/xiazai/sucai/4143" title="2026新年加载进度条矢量图片"><span>[网站素材]</span><span>2026新年加载进度条矢量图片</span> </a> </div> </li> <li> <div class="wzrfourli flexRow"> <b></b> <a target="_blank" href="/xiazai/sucai/4142" title="创意工作室营业海报设计素材下载"><span>[网站素材]</span><span>创意工作室营业海报设计素材下载</span> </a> </div> </li> <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> </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="天天团购系统" href="/xiazai/code/11174">天天团购系统</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="MediPro网上书店系统" href="/xiazai/code/10950">MediPro网上书店系统</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="MediPro企业网站管理系统" href="/xiazai/code/10814">MediPro企业网站管理系统</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="Simple Groupware0.745" href="/xiazai/code/10517">Simple Groupware0.745</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="PrestaShop 开源网店系统" href="/xiazai/code/10403">PrestaShop 开源网店系统</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="爱普达(Aipuda)多语言企业网站管理系统6.3.0" href="/xiazai/code/9701">爱普达(Aipuda)多语言企业网站管理系统6.3.0</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="科威旅游管理系统" href="/xiazai/code/9646">科威旅游管理系统</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/1665.html" title="PHP课程"> <img src="https://img.php.cn/upload/course/000/000/090/6892cfe1adf0c212.png?x-oss-process=image/resize,m_mfit,h_75,w_120,limit_0" alt="PHP课程" class="ristyAimg" onerror="this.src='/static/mobimages/moren/morentu.png'"> </a> <div class="ristyaRight flexColumn"> <a target="_blank" href="/course/1665.html" title="PHP课程" class="rirightp overflowclass">PHP课程</a> <div class="risrdown flexRow"> <p>共137课时 | 8.1万人学习</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_75,w_120,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_75,w_120,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> <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.7万人学习</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="在python的开发过程中如何进行单链表的实现(代码)" href="/faq/410152.html">在python的开发过程中如何进行单链表的实现(代码)</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="如何理解Elasticsearch单机双节点集群部署" href="/faq/410098.html">如何理解Elasticsearch单机双节点集群部署</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="如何理解关于memset函数" href="/faq/410086.html">如何理解关于memset函数</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="启动页进入时有短暂黑屏或白屏现象的终极解决方案" href="/faq/410082.html">启动页进入时有短暂黑屏或白屏现象的终极解决方案</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="如何把WebStorm上传代码到Git" href="/faq/410073.html">如何把WebStorm上传代码到Git</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="分布式系统唯一ID生成方案汇总" href="/faq/410049.html">分布式系统唯一ID生成方案汇总</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="如何在远程过程调用(RPC)" href="/faq/410044.html">如何在远程过程调用(RPC)</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="Visual Studio Code中安装go语言插件" href="/faq/410043.html">Visual Studio Code中安装go语言插件</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="详解Sublime Text 2" href="/faq/402795.html">详解Sublime Text 2</a></div> <div class="xgwzlid flexRow"><b></b><a target="_blank" title="用CSS实现的一张图完成的按钮实例" href="/faq/395922.html">用CSS实现的一张图完成的按钮实例</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=164078&time=1767212391"> </script> <script src="/static/ueditor/third-party/SyntaxHighlighter/shCore.js?1767212391"></script> <script> article_status = "0"; </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>