欢迎光临
我们一直在努力

phpcms v9数据库操作类详解 (phpcms v9 数据库操作类)

PHP是一个开源的、高效的服务器端脚本语言,它可以让网站开发者轻松、快速、高效地编写出优质的Web应用程序。PHP内容管理系统 (CMS)是现代Web应用程序的主要构成部分,它与数据库密切相关。本文将详细介绍PHPCMS v9数据库操作类的用途、功能及其实现原理。

1. PHPCMS v9简介

PHPCMS v9是一款基于PHP+MySQL开发的CMS软件,它是Phpcms底层开发框架,也是后期开发者二次开发的重要支持。PHPCMS v9是一款免费开源软件,具有模板扩展性强、插件化设计、易于二次开发等优点,因此被广泛应用于各类网站开发中。

2. 数据库操作类的作用

在PHPCMS中,使用数据库操作类可以轻松地完成对数据库的增、删、改、查等操作,极大地提高了开发效率和程序可靠性。数据库操作类是Phpcms中的一个核心组件,通过它可以方便地操作MySQL数据库,实现数据的增加、删除、修改和查询等操作。同时,它还为开发者提供了完善的错误提示和处理功能,可有效避免因数据错误导致程序崩溃的情况。

3. 数据库操作类的基本原理

PHPCMS v9的数据库操作类库分为两大部分,即数据库驱动类和基础类库。其中,数据库驱动类主要负责具体的数据库访问操作,而基础类库提供了一些通用的操作方法和接口。

具体来说,数据库驱动类库通过抽象类和接口的方式,定义了数据库访问的各种方法,将不同数据库的具体实现委托给各个子类完成,从而达到不同数据库之间互不干扰的目的。

同时,基础类库中也定义了一系列常用的函数和方法,包括数据库连接、结果集处理、数据的增删改查等操作。

4. 数据库驱动类

PHPCMS v9的数据库驱动类主要定义了一下几个接口和抽象类:

(1)DB驱动接口类

该接口定义了数据库访问的基本方法,主要包括数据库连接、执行sql语句、获取结果集、获取错误信息等方法。

(2)MYSQL驱动类

该类是DB驱动接口的一个实现类,实现了具体的MySQL数据库访问逻辑。主要包括数据库连接、关闭、执行sql语句、获取结果集、获取错误信息等方法。代码如下:

“`

defined(‘IN_PHPCMS’) or exit(‘No permission resources.’);

pc_base::load_sys_class(‘db_driver’);

class mysql_driver extends db_driver {

public function __construct($config = ”) {

if (!extension_loaded(‘mysqli’)) {

throw new Exception(L(‘数据库无法连接,请检查PHP是否支持mysqli扩展’));

}

parent::__construct($config);

}

public function connect() {

if (!is_null($this->_linkID)) {

return $this->_linkID;

}

$host = $this->config[‘hostname’];

$port = $this->config[‘hostport’];

$user = $this->config[‘username’];

$password = $this->config[‘password’];

$database = $this->config[‘database’];

$charset = $this->config[‘charset’] ? $this->config[‘charset’] : ‘utf8’;

$connect_type = $this->config[‘persist’] ? ‘mysqli_persistent’ : ‘mysqli’;

$this->_linkID = @call_user_func($connect_type, $host, $user, $password, $database, $port);

if (!$this->_linkID) {

throw new Exception(L(‘数据库连接错误:’ . mysqli_connect_errno()));

}

if (mysqli_connect_error()) {

throw new Exception(L(‘数据库连接错误:’ . mysqli_connect_error()));

}

if (!mysqli_select_db($this->_linkID, $database)) {

throw new Exception(L(‘无法打开指定的数据库:’ . mysqli_error($this->_linkID)));

}

mysqli_query($this->_linkID, “SET NAMES ‘” . $charset . “‘”);

mysqli_query($this->_linkID, “SET time_zone = ‘” . date(‘P’) . “‘”);

}

public function prepare($sql) {

$this->query_str = $sql;

if (!$this->_linkID) {

$this->connect();

}

$this->_queryID = mysqli_prepare($this->_linkID, $sql);

if (!$this->_queryID) {

throw new Exception(L(‘sql语句错误:’ . mysqli_error($this->_linkID)));

}

return $this->_queryID;

}

public function execute($sql = ”) {

if ($sql) {

$this->prepare($sql);

}

if (!$this->_queryID) {

throw new Exception(L(‘请先执行prepare()方法生成查询对象’));

}

if (!mysqli_stmt_execute($this->_queryID)) {

throw new Exception(L(‘执行查询错误:’ . mysqli_stmt_error($this->_queryID)));

}

$this->num_rows = mysqli_stmt_affected_rows($this->_queryID);

}

public function query($sql, $result_mode = MYSQLI_STORE_RESULT) {

$this->query_str = $sql;

if (!$this->_linkID) {

$this->connect();

}

$this->_queryID = mysqli_query($this->_linkID, $sql, $result_mode);

if (!$this->_queryID) {

throw new Exception(L(‘sql语句错误:’ . mysqli_error($this->_linkID)));

}

$this->num_rows = mysqli_affected_rows($this->_linkID);

return $this->_queryID;

}

public function fetch_array($query) {

return mysqli_fetch_array($query);

}

public function fetch_assoc($query) {

return mysqli_fetch_assoc($query);

}

public function fetch_row($query) {

return mysqli_fetch_row($query);

}

public function num_rows($query = ”) {

if (!$query) {

$query = $this->_queryID;

}

return mysqli_num_rows($query);

}

public function free_result($query = ”) {

if (!$query) {

$query = $this->_queryID;

}

mysqli_free_result($query);

$this->_queryID = null;

}

public function insert_id() {

return mysqli_insert_id($this->_linkID);

}

public function error() {

return mysqli_error($this->_linkID);

}

public function errno() {

return mysqli_errno($this->_linkID);

}

public function close() {

if ($this->_linkID) {

mysqli_close($this->_linkID);

}

$this->_linkID = null;

}

}

?>

“`

(3)PDO驱动类

PDO是PHP官方提供的一款数据库连接和操作的标准API,它支持多种数据库连接,包括MySQL、PostgreSQL、Oracle等。因此,PHPCMS v9也提供了PDO方式的数据库驱动实现。该类的主要作用是对PDO对象进行初始化和封装,使得开发者可以使用PDO方式轻松地操作数据库。

具体实现方式可以参考代码:

“`

defined(‘IN_PHPCMS’) or exit(‘No permission resources.’);

class pdo_driver extends db_driver {

public function __construct($config = ”) {

if (!extension_loaded(‘pdo’)) {

throw new Exception(L(‘数据库无法连接,请检查PHP是否支持pdo扩展’));

}

parent::__construct($config);

}

public function connect() {

if (!is_null($this->_linkID)) {

return $this->_linkID;

}

$host = $this->config[‘hostname’];

$port = $this->config[‘hostport’];

$user = $this->config[‘username’];

$password = $this->config[‘password’];

$database = $this->config[‘database’];

$charset = $this->config[‘charset’] ? $this->config[‘charset’] : ‘utf8’;

$dsn = sprintf(‘mysql:host=%s;port=%s;dbname=%s;charset=%s’, $host, $port, $database, $charset);

$options = array(

PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,

PDO::MYSQL_ATTR_INIT_COMMAND => ‘SET NAMES ‘ . $charset,

);

$this->_linkID = new PDO($dsn, $user, $password, $options);

}

public function execute($sql = ”) {

if (!$sql) {

throw new Exception(L(‘请先执行prepare()方法生成查询对象’));

}

try {

$stmt = $this->_linkID->prepare($sql);

$stmt->execute();

$this->num_rows = $stmt->rowCount();

return $stmt;

} catch (PDOEewception $e) {

throw new Exception(L(‘sql语句错误:’ . $e->getMessage()));

}

}

public function prepare($sql) {

$this->query_str = $sql;

if (!$this->_linkID) {

$this->connect();

}

try {

$stmt = $this->_linkID->prepare($sql);

if (!$stmt) {

throw new Exception(L(‘sql语句错误:’ . $this->_linkID->errorInfo()[2]));

}

$this->num_rows = $stmt->rowCount();

return $stmt;

} catch (PDOEewception $e) {

throw new Exception(L(‘sql语句错误:’ . $e->getMessage()));

}

}

public function query($sql, $result_mode = PDO::FETCH_ASSOC) {

$this->query_str = $sql;

if (!$this->_linkID) {

$this->connect();

}

try {

$stmt = $this->_linkID->query($sql);

if (!$stmt) {

throw new Exception(L(‘sql语句错误:’ . $this->_linkID->errorInfo()[2]));

}

$this->num_rows = $stmt->rowCount();

return $stmt->fetchAll($result_mode);

} catch (PDOEewception $e) {

throw new Exception(L(‘sql语句错误:’ . $e->getMessage()));

}

}

public function fetch_array($query) {

return $query->fetch(PDO::FETCH_BOTH);

}

public function fetch_assoc($query) {

return $query->fetch(PDO::FETCH_ASSOC);

}

public function fetch_row($query) {

return $query->fetch(PDO::FETCH_NUM);

}

public function num_rows($query = ”) {

if (!$query) {

$query = $this->_queryID;

}

return $query->rowCount();

}

public function free_result($query = ”) {

return true;

}

public function insert_id() {

return $this->_linkID->lastInsertId();

}

public function error() {

$error = $this->_linkID->errorInfo();

if (isset($error[2])) {

return $error[2];

}

return $error[0];

}

public function errno() {

$error = $this->_linkID->errorInfo();

if (isset($error[1])) {

return $error[1];

}

return 0;

}

public function close() {

$this->_linkID = null;

}

}

?>

“`

5. 数据库操作基类

PHPCMS v9的数据库操作基类库封装了一些常用的操作方法,包括数据库连接、执行sql语句、数据的增、删、改、查等操作。下面是基类库的具体代码实现:

“`

defined(‘IN_PHPCMS’) or exit(‘No permission resources.’);

abstract class db_driver {

public $config = array();

protected $_linkID = null;

protected $_queryID = null;

protected $query_str = ”;

protected $num_rows = 0;

public function __construct($config = ”) {

if (is_string($config)) {

$config = explode(‘,’, $config);

$config = array(

‘hostname’ => $config[0],

‘hostport’ => $config[1],

‘username’ => $config[2],

‘password’ => $config[3],

‘database’ => $config[4],

‘charset’ => isset($config[5]) ? $config[5] : ”,

‘persist’ => isset($config[6]) ? $config[6] : false,

);

}

$this->config = array_change_key_case($config, CASE_LOWER);

$this->connect();

}

abstract public function connect(); // 连接数据库方法

abstract public function execute($sql = ”);

abstract public function prepare($sql);

abstract public function query($sql, $result_mode = MYSQLI_STORE_RESULT); // 执行查询方法

abstract public function fetch_array($query);

abstract public function fetch_assoc($query);

abstract public function fetch_row($query);

abstract public function num_rows($query = ”);

abstract public function free_result($query = ”);

abstract public function insert_id(); // 获取上一次插入操作的自增ID

abstract public function error(); // 获取错误信息

abstract public function errno(); // 获取错误编码

abstract public function close(); // 关闭数据库连接

}

?>

“`

6. 数据库操作示例

了解了PHPCMS v9的数据库操作类,接下来我们来看一下具体的实例。假设我们有一张名为studen的学生表,其中包括id、name、sex、age等字段。我们可以通过以下代码示例,对学生表进行增、删、改、查等操作:

“`

// 引入PHPCMS v9数据库操作类

pc_base::load_sys_class(‘db_factory’, ”, 0);

// 定义数据库连接参数

$config = array(

‘hostname’ => ‘localhost’,

‘hostport’ => ‘3306’,

‘username’ => ‘root’,

‘password’ => ”,

‘database’ => ‘test’,

‘charset’ => ‘utf8’

);

// 创建数据库连接实例

$db = db_factory::get_instance(‘pdo’, $config);

// 插入数据

$data = array(

‘name’ => ‘张三’,

‘sex’ => ‘男’,

‘age’ => 18

);

$result = $db->insert(‘student’, $data);

if ($result) {

echo ‘数据插入成功’;

} else {

echo ‘数据插入失败’;

}

// 更新数据

$data = array(

‘name’ => ‘李四’,

‘sex’ => ‘女’,

‘age’ => 20

);

$where = array(‘id’ => 1);

$result = $db->update(‘student’, $data, $where);

if ($result) {

echo ‘数据更新成功’;

} else {

echo ‘数据更新失败’;

}

// 查询数据

$where = array(‘sex’ => ‘男’);

$field = array(‘name’, ‘age’);

$result = $db->select(‘student’, $where, $field);

if ($result) {

foreach ($result as $v) {

echo $v[‘name’] . ‘ – ‘ . $v[‘age’] . ‘
‘;

}

} else {

echo ‘没有符合条件的数据’;

}

// 删除数据

$where = array(‘id’ => 1);

$result = $db->delete(‘student’, $where);

if ($result) {

echo ‘数据删除成功’;

} else {

echo ‘数据删除失败’;

}

“`

通过以上代码实例,我们可以看到PHPCMS v9数据库操作类的强大功能。无论是数据库的增删改查还是数据的分页操作,都可以轻松地实现。在Phpcms的二次开发中,这个功能强大的数据库操作类也是难以替代的。

本文介绍了PHPCMS v9的数据库操作类的定义、实现原理和示例。对于熟悉PHP开发的开发人员来说,学习和掌握Phpcms的数据库操作类是必要的。Phpcms的二次开发中,这个功能强大的数据库操作类也是难以替代的。在不同类型的数据库环境下,数据库操作类也可以轻松地切换,大大提高了开发的效率和程序的可靠性。

相关问题拓展阅读:

  • PHPCMS V9中的GET怎么使用?
  • phpcms v9 安装时”成功连接数据库,但是指定的数据库不存在并且无法自动创建,请先通过其他方法连接数据库

PHPCMS V9中的GET怎么使用?

{pc:get sql=”select * from v9_rent a,v9_rent_data b where a.id=b.id and catid=15 and status=99 order by inputtime desc” num=”1″ return=“data”}

{loop $data $n $r}

·{str_cut($r,22,”岩衡)}</p> <p><p>{/loop}</p> <p>{/pc}</p> <p>1.什么是phpcms 的 Get标签?</p> <p>通俗来讲,get 标签是Phpcms定义的能直接调用数据库里面内容的简单化、友好化代码,她可调用本系统和外部数据,只有你对SQL有一定的了解,她就是你的绝世好剑! 也就是适合熟悉SQL语句的人使用。有了她,我们打造个性化的网站,能非常方便的调用出数据库里面指定的内容。通过条件限制,我们可以调用出不同条件下的 不同数据。</p> <p>如果说,我不懂SQL怎么办?没有问题,get 标签还有强大的创建工具(看这里),Phpcms2023 在新建模板和修改模板页面增加了 get 标签傻瓜式生成器,get 标签生成器可以帮助您列出指定数据源的数据表和字段,通过填空和选择方式生备备成可用的 get 标签代码。Phpcms2023 首次提供了最全面的数据字段,对本系统任何数据表和字段都提供了中文说明,这也会大大降低 get 标签的使用难度。</p> <p>phpcms V9 保留了2023的get标睁滚闹签的使用方法</p> <p>它包括了2种方式一种是内部数据,</p> <p>另一种是外部数据</p> <p>1、外部数据的悉罩调用</p> <p>{ pc : get sql = “SELECT * FROM phpcms_member” cache = “3600” page = “$page” dbsource = “discuz” return = “data” }</p> <p>{ loop $data $key $val }</p> <p>{ $val }</p> <p>{ /loop}</p> <p>{ $pages }</p> <p>{/ pc }</p> <p>一个是数据源,一个是产生的pages翻页 </p> <p>我们再分析下内部数据的使用方法</p> <p>2、内部数据的调用</p> <p>{pc:get sql=”SELECT * FROM `XX` WHERE fid =$ltid AND digest =2 AND ifupload =1 ORDER BY tid DESC” num=”2″ cache= “3600” return=”data” }</p> <p>{loop $data $r}</p> <p>。。。。。</p> <p>{/loop}{/pc}</p> <p>由此可以看出 get 语句支持num的用法但是不支持 limit 5,5.这样的用法</p> <p>实在是很遗憾</p> <p>num是调用的条数</p> <p>get 标签参数完整剖析</p> <p>{get dbsource=”数据源” dbname=”数据库” sql=”SQL语句” rows=”行数” return=”返回变量名称” page=”$page”}</p> <p>输出代码(含返回变量值、数组、函数等)</p> <p>{/get}</p> <p>复制代码</p> <p>dbsource=”数据源” –></p> <h3>phpcms v9 安装时”成功连接数据库,但是指定的数据库不存在并且无法自动创建,请先通过其他方法连接数据库</h3> <p>这个问题出现的原因就是没有指定的数据库名称;</p> <p>如果你使用的用户的权限足够大的话,是root的话,那么可以自动创建新的数据库;如果是使用其它用户,要么更改权限,要么新建数据库,然后赋予指定的用户;</p> <p>关于phpcms v9 数据库操作类的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。</p> </article> <div class="post-actions"> <a href="javascript:;" etap="like" class="post-like action action-like" data-pid="610591"><i class="tbfa"></i>赞(<span>0</span>)</a> </div> <div class="post-copyright-custom">【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。</div> <div class="shares"><dfn>分享到</dfn><a href="javascript:;" data-url="https://www.27ka.cn/610591.html" class="share-weixin" title="分享到微信"><i class="tbfa"></i></a><a etap="share" data-share="weibo" class="share-tsina" title="分享到微博"><i class="tbfa"></i></a><a etap="share" data-share="qq" class="share-sqq" title="分享到QQ好友"><i class="tbfa"></i></a><a etap="share" data-share="qzone" class="share-qzone" title="分享到QQ空间"><i class="tbfa"></i></a><a etap="share" data-share="line" class="share-line" title="分享到Line"><i class="tbfa"></i></a><a etap="share" data-share="twitter" class="share-twitter" title="分享到X"><i class="tbfa"></i></a><a etap="share" data-share="facebook" class="share-facebook" title="分享到Facebook"><i class="tbfa"></i></a><a etap="share" data-share="telegram" class="share-telegram" title="分享到Telegram"><i class="tbfa"></i></a><a etap="share" data-share="skype" class="share-skype" title="分享到Skype"><i class="tbfa"></i></a></div> <div class="article-tags"></div> <nav class="article-nav"> <span class="article-nav-prev">上一篇<br><a href="https://www.27ka.cn/610590.html" rel="prev">html中如何使用js来获取本地系统时间</a></span> <span class="article-nav-next">下一篇<br><a href="https://www.27ka.cn/610592.html" rel="next">react中如何引入js文件</a></span> </nav> <div class="relates relates-textcol2"><div class="title"><h3>相关推荐</h3></div><ul><li><a href="https://www.27ka.cn/613364.html">Java做到自动迁移Oracle数据库 (java实现oracle数据库自动迁移)</a></li><li><a href="https://www.27ka.cn/613362.html">比较mysql数据库中字符串长度的方法和注意事项 (mysql数据库比较字符串长度)</a></li><li><a href="https://www.27ka.cn/613360.html">Spring轻松释放数据库连接,提高性能 (spring释放数据库连接)</a></li><li><a href="https://www.27ka.cn/613359.html">什么? (区分数据库类型的根据是)</a></li><li><a href="https://www.27ka.cn/613357.html">Dede助你轻松搞定!教你如何批量添加数据库表 (dede如何批量添加数据库表)</a></li><li><a href="https://www.27ka.cn/613355.html">Win10系统无法连接数据库,如何解决? (win10系统语言无法连接数据库)</a></li><li><a href="https://www.27ka.cn/613353.html">无法使用索引的查询语句在数据库中的影响与解决方法 (数据库查询无法使用索引的语句)</a></li><li><a href="https://www.27ka.cn/613351.html">快速更新SQL2023数据库记录 (sql2023数据库更新一条信息)</a></li></ul></div> </div> </div> <div class="sidebar"> <div class="widget-on-phone widget widget_ui_orbui"><div class="item"><a href="https://www.sukeyun.com/" target="_blank"><img src="https://www.27ka.cn/wp-content/uploads/2024/09/A0E13A9F04.png"></a></div></div><div class="widget-on-phone widget widget_ui_posts"><h3>热门推荐</h3><ul><li><a target="_blank" href="https://www.27ka.cn/9161.html"><span class="thumbnail"><img data-src="https://www.27ka.cn/wp-content/uploads/2022/12/2020014124124.webp" alt="云搜网推荐“原生IP”原生静态住宅IP、原生家庭IP、原生传媒IP、解锁tiktok、Netflix、多个游戏等商家平台-云搜网" src="https://www.27ka.cn/wp-content/themes/dux/assets/img/thumbnail.png" class="thumb"></span><span class="text">云搜网推荐“原生IP”原生静态住宅IP、原生家庭IP、原生传媒IP、解锁tiktok、Netflix、多个游戏等商家平台</span><span class="muted">2022-12-04</span></a></li><li><a target="_blank" href="https://www.27ka.cn/4986.html"><span class="thumbnail"><img data-src="https://www.27ka.cn/wp-content/uploads/2022/05/2022052520161-1.png" alt="云搜网推荐“站群服务器”VPS站群服务器的商家列表-云搜网" src="https://www.27ka.cn/wp-content/themes/dux/assets/img/thumbnail.png" class="thumb"></span><span class="text">云搜网推荐“站群服务器”VPS站群服务器的商家列表</span><span class="muted">2022-05-25</span></a></li><li><a target="_blank" href="https://www.27ka.cn/4971.html"><span class="thumbnail"><img data-src="https://www.27ka.cn/wp-content/uploads/2022/05/2022052519452.png" alt="云搜网推荐国外VPS,精挑细选“最便宜VPS”,便宜还“靠谱”-云搜网" src="https://www.27ka.cn/wp-content/themes/dux/assets/img/thumbnail.png" class="thumb"></span><span class="text">云搜网推荐国外VPS,精挑细选“最便宜VPS”,便宜还“靠谱”</span><span class="muted">2022-05-25</span></a></li><li><a target="_blank" href="https://www.27ka.cn/4980.html"><span class="thumbnail"><img data-src="https://www.27ka.cn/wp-content/uploads/2022/05/2022052520081-1.png" alt="云搜网推荐“外贸”VPS和服务器的商家列表,全球CN2网络-云搜网" src="https://www.27ka.cn/wp-content/themes/dux/assets/img/thumbnail.png" class="thumb"></span><span class="text">云搜网推荐“外贸”VPS和服务器的商家列表,全球CN2网络</span><span class="muted">2022-05-25</span></a></li><li><a target="_blank" href="https://www.27ka.cn/4992.html"><span class="thumbnail"><img data-src="https://www.27ka.cn/wp-content/uploads/2022/05/2022052520291.png" alt="云搜网推荐海外“服务器”租用推荐:便宜好用、优化线路!-云搜网" src="https://www.27ka.cn/wp-content/themes/dux/assets/img/thumbnail.png" class="thumb"></span><span class="text">云搜网推荐海外“服务器”租用推荐:便宜好用、优化线路!</span><span class="muted">2022-05-25</span></a></li></ul></div><div class="widget-on-phone widget widget_ui_orbui"><div class="item"><h3>分类目录</h3> <div class="tbcm-newtags"> <a href="https://www.27ka.cn/tag/香港vps">香港VPS</a> <a href="https://www.27ka.cn/tag/欧洲vps">欧洲VPS</a> <a href="https://www.27ka.cn/tag/日本vps">日本VPS</a> <a href="https://www.27ka.cn/tag/印尼vps">印尼VPS</a> <a href="https://www.27ka.cn/tag/外贸vps">外贸VPS</a> <a href="https://www.27ka.cn/tag/美国vps">美国VPS</a> <a href="https://www.27ka.cn/tag/迪拜vps">迪拜VPS</a> <a href="https://www.27ka.cn/tag/德国vps">德国VPS</a> <a href="https://www.27ka.cn/tag/韩国vps">韩国VPS</a> <a href="https://www.27ka.cn/tag/便宜vps">便宜VPS</a> <a href="https://www.27ka.cn/tag/英国vps">英国VPS</a> <a href="https://www.27ka.cn/tag/荷兰vps">荷兰VPS</a> <a href="https://www.27ka.cn/tag/南非vps">南非VPS</a> <a href="https://www.27ka.cn/tag/印度vps">印度VPS</a> <a href="https://www.27ka.cn/tag/越南vps">越南VPS</a> <a href="https://www.27ka.cn/tag/法国vps">法国VPS</a> <a href="https://www.27ka.cn/tag/埃及vps">埃及VPS</a> <a href="https://www.27ka.cn/tag/巴林vps">巴林VPS</a> <a href="https://www.27ka.cn/tag/波兰vps">波兰VPS</a> <a href="https://www.27ka.cn/tag/巴西vps">巴西VPS</a> <a href="https://www.27ka.cn/tag/台湾vps">台湾VPS</a> <a href="https://www.27ka.cn/tag/纽约vps">纽约VPS</a> <a href="https://www.27ka.cn/tag/高防vps">高防VPS</a> <a href="https://www.27ka.cn/tag/西雅图vps">西雅图VPS</a> <a href="https://www.27ka.cn/tag/圣何塞vps">圣何塞VPS</a> <a href="https://www.27ka.cn/tag/芝加哥vps">芝加哥VPS</a> <a href="https://www.27ka.cn/tag/达拉斯vps">达拉斯VPS</a> <a href="https://www.27ka.cn/tag/土耳其vps">土耳其VPS</a> <a href="https://www.27ka.cn/tag/新加坡vps">新加坡VPS</a> <a href="https://www.27ka.cn/tag/菲律宾vps">菲律宾VPS</a> <a href="https://www.27ka.cn/tag/俄罗斯vps">俄罗斯VPS</a> <a href="https://www.27ka.cn/tag/柬埔寨vps">柬埔寨VPS</a> <a href="https://www.27ka.cn/tag/搬瓦工vps">搬瓦工VPS</a> <a href="https://www.27ka.cn/tag/大硬盘vps">大硬盘VPS</a> <a href="https://www.27ka.cn/tag/卢森堡vps">卢森堡VPS</a> <a href="https://www.27ka.cn/tag/孟加拉国vps">孟加拉国VPS</a> <a href="https://www.27ka.cn/tag/澳大利亚vps">澳大利亚VPS</a> <a href="https://www.27ka.cn/tag/保加利亚vps">保加利亚VPS</a> <a href="https://www.27ka.cn/tag/马来西亚vps">马来西亚VPS</a> <a href="https://www.27ka.cn/tag/印度尼西亚vps">印度尼西亚VPS</a> <a href="https://www.27ka.cn/tag/沙特阿拉伯vps">沙特阿拉伯VPS</a> <a href="https://www.27ka.cn/tag/CDN">CDN</a> <a href="https://www.27ka.cn/tag/高防cdn">高防CDN</a> <a href="https://www.27ka.cn/tag/云服务器">云服务器</a> <a href="https://www.27ka.cn/tag/香港服务器">香港服务器</a> <a href="https://www.27ka.cn/tag/日本服务器">日本服务器</a> <a href="https://www.27ka.cn/tag/欧洲服务器">欧洲服务器</a> <a href="https://www.27ka.cn/tag/美国服务器">美国服务器</a> <a href="https://www.27ka.cn/tag/德国服务器">德国服务器</a> <a href="https://www.27ka.cn/tag/韩国服务器">韩国服务器</a> <a href="https://www.27ka.cn/tag/英国服务器">英国服务器</a> <a href="https://www.27ka.cn/tag/荷兰服务器">荷兰服务器</a> <a href="https://www.27ka.cn/tag/南非服务器">南非服务器</a> <a href="https://www.27ka.cn/tag/外贸服务器">外贸服务器</a> <a href="https://www.27ka.cn/tag/印度服务器">印度服务器</a> <a href="https://www.27ka.cn/tag/非洲服务器">非洲服务器</a> <a href="https://www.27ka.cn/tag/站群服务器">站群服务器</a> <a href="https://www.27ka.cn/tag/越南服务器">越南服务器</a> <a href="https://www.27ka.cn/tag/台湾服务器">台湾服务器</a> <a href="https://www.27ka.cn/tag/高防服务器">高防服务器</a> <a href="https://www.27ka.cn/tag/新加坡服务器">新加坡服务器</a> <a href="https://www.27ka.cn/tag/菲律宾服务器">菲律宾服务器</a> <a href="https://www.27ka.cn/tag/俄罗斯服务器">俄罗斯服务器</a> </div></div></div></div></section> <footer class="footer"> <div class="container"> <p>© 2014-2025   <a href="https://www.27ka.cn">云搜网</a>   <a href="https://www.27ka.cn/go/beianmiit" rel="external nofollow" target="_blank"> 鄂ICP备2021015104号-2 </a> </script> <a href="https://www.27ka.cn/sitemap.xml"> SiteMap </a> </br> </br> </script></span><strong><span style="color: #ff0000;">本站不销售产品、不代购、不提供技术支持,仅分享信息,请遵纪守法、文明上网。</span></strong></a></p> <script type="pmdelayedscript" data-cfasync="false" data-no-optimize="1" data-no-defer="1" data-no-minify="1" data-rocketlazyloadscript="1"> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?c8bb186265646432de4e37fc15f8494d"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </div> </footer> <script>window.TBUI={"www":"https:\/\/www.27ka.cn","uri":"https:\/\/www.27ka.cn\/wp-content\/themes\/dux","ajaxurl":"https:\/\/www.27ka.cn\/wp-admin\/admin-ajax.php","ver":"9.1","roll":"1 2","copyoff":0,"ajaxpager":"0","fullimage":"1","captcha":0,"captcha_comment":0,"captcha_login":1,"captcha_register":1,"table_scroll_m":1,"table_scroll_w":"800","pre_color":1,"pre_copy":1,"lang":{"copy":"\u590d\u5236","copy_success":"\u5df2\u590d\u5236","comment_loading":"\u8bc4\u8bba\u63d0\u4ea4\u4e2d...","comment_cancel_edit":"\u53d6\u6d88\u7f16\u8f91","loadmore":"\u52a0\u8f7d\u66f4\u591a","like_login":"\u70b9\u8d5e\u8bf7\u5148\u767b\u5f55","liked":"\u4f60\u5df2\u8d5e\uff01","delete_post":"\u786e\u5b9a\u5220\u9664\u8fd9\u4e2a\u6587\u7ae0\u5417\uff1f","read_post_all":"\u70b9\u51fb\u9605\u8bfb\u4f59\u4e0b\u5168\u6587","copy_wechat":"\u5fae\u4fe1\u53f7\u5df2\u590d\u5236","sign_password_less":"\u5bc6\u7801\u592a\u77ed\uff0c\u81f3\u5c116\u4f4d","sign_username_none":"\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a","sign_email_error":"\u90ae\u7bb1\u683c\u5f0f\u9519\u8bef","sign_vcode_loading":"\u9a8c\u8bc1\u7801\u83b7\u53d6\u4e2d","sign_vcode_new":" \u79d2\u91cd\u65b0\u83b7\u53d6"},"turnstile_key":""}</script> <!-- Lasso tracking events - Performance --> <script type="text/javascript" src="https://js.lasso.link/lasso-performance.min.js?ver=131.20250415" defer></script> <script type="text/javascript" defer> document.addEventListener("lassoTrackingEventLoaded", function(e) { e.detail.init({ 'lsid': 'ls-8iacp48n57aibgk06bh142r66l', 'pid': '610591', 'ipa': '', 'performance': '1', 'matching': '1', }); }); </script> <script type="text/javascript" src="https://www.27ka.cn/wp-content/themes/dux/assets/js/libs/jquery.min.js?ver=9.1" id="jquery-js"></script> <script data-minify="1" type="text/javascript" src="https://www.27ka.cn/wp-content/cache/min/1/wp-content/themes/dux/assets/js/loader.js?ver=1679672520" id="loader-js"></script> <script id="perfmatters-delayed-scripts-js">const pmDelayClick=false;const pmDelayTimer=setTimeout(pmTriggerDOMListener,10*1000);const pmUserInteractions=["keydown","mousedown","mousemove","wheel","touchmove","touchstart","touchend"],pmDelayedScripts={normal:[],defer:[],async:[]},jQueriesArray=[],pmInterceptedClicks=[];var pmDOMLoaded=!1,pmClickTarget="";function pmTriggerDOMListener(){"undefined"!=typeof pmDelayTimer&&clearTimeout(pmDelayTimer),pmUserInteractions.forEach(function(e){window.removeEventListener(e,pmTriggerDOMListener,{passive:!0})}),document.removeEventListener("visibilitychange",pmTriggerDOMListener),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",pmTriggerDelayedScripts):pmTriggerDelayedScripts()}async function pmTriggerDelayedScripts(){pmDelayEventListeners(),pmDelayJQueryReady(),pmProcessDocumentWrite(),pmSortDelayedScripts(),pmPreloadDelayedScripts(),await pmLoadDelayedScripts(pmDelayedScripts.normal),await pmLoadDelayedScripts(pmDelayedScripts.defer),await pmLoadDelayedScripts(pmDelayedScripts.async),await pmTriggerEventListeners(),document.querySelectorAll("link[data-pmdelayedstyle]").forEach(function(e){e.setAttribute("href",e.getAttribute("data-pmdelayedstyle"))}),window.dispatchEvent(new Event("perfmatters-allScriptsLoaded")),pmWaitForPendingClicks().then(()=>{pmReplayClicks()})}function pmDelayEventListeners(){let e={};function t(t,n){function r(n){return e[t].delayedEvents.indexOf(n)>=0?"perfmatters-"+n:n}e[t]||(e[t]={originalFunctions:{add:t.addEventListener,remove:t.removeEventListener},delayedEvents:[]},t.addEventListener=function(){arguments[0]=r(arguments[0]),e[t].originalFunctions.add.apply(t,arguments)},t.removeEventListener=function(){arguments[0]=r(arguments[0]),e[t].originalFunctions.remove.apply(t,arguments)}),e[t].delayedEvents.push(n)}function n(e,t){let n=e[t];Object.defineProperty(e,t,{get:n||function(){},set:function(n){e["perfmatters"+t]=n}})}t(document,"DOMContentLoaded"),t(window,"DOMContentLoaded"),t(window,"load"),t(window,"pageshow"),t(document,"readystatechange"),n(document,"onreadystatechange"),n(window,"onload"),n(window,"onpageshow")}function pmDelayJQueryReady(){let e=window.jQuery;Object.defineProperty(window,"jQuery",{get:()=>e,set(t){if(t&&t.fn&&!jQueriesArray.includes(t)){t.fn.ready=t.fn.init.prototype.ready=function(e){pmDOMLoaded?e.bind(document)(t):document.addEventListener("perfmatters-DOMContentLoaded",function(){e.bind(document)(t)})};let n=t.fn.on;t.fn.on=t.fn.init.prototype.on=function(){if(this[0]===window){function e(e){return e=(e=(e=e.split(" ")).map(function(e){return"load"===e||0===e.indexOf("load.")?"perfmatters-jquery-load":e})).join(" ")}"string"==typeof arguments[0]||arguments[0]instanceof String?arguments[0]=e(arguments[0]):"object"==typeof arguments[0]&&Object.keys(arguments[0]).forEach(function(t){delete Object.assign(arguments[0],{[e(t)]:arguments[0][t]})[t]})}return n.apply(this,arguments),this},jQueriesArray.push(t)}e=t}})}function pmProcessDocumentWrite(){let e=new Map;document.write=document.writeln=function(t){var n=document.currentScript,r=document.createRange();let a=e.get(n);void 0===a&&(a=n.nextSibling,e.set(n,a));var i=document.createDocumentFragment();r.setStart(i,0),i.appendChild(r.createContextualFragment(t)),n.parentElement.insertBefore(i,a)}}function pmSortDelayedScripts(){document.querySelectorAll("script[type=pmdelayedscript]").forEach(function(e){e.hasAttribute("src")?e.hasAttribute("defer")&&!1!==e.defer?pmDelayedScripts.defer.push(e):e.hasAttribute("async")&&!1!==e.async?pmDelayedScripts.async.push(e):pmDelayedScripts.normal.push(e):pmDelayedScripts.normal.push(e)})}function pmPreloadDelayedScripts(){var e=document.createDocumentFragment();[...pmDelayedScripts.normal,...pmDelayedScripts.defer,...pmDelayedScripts.async].forEach(function(t){var n=t.getAttribute("src");if(n){var r=document.createElement("link");r.href=n,"module"==t.getAttribute("data-perfmatters-type")?r.rel="modulepreload":(r.rel="preload",r.as="script"),e.appendChild(r)}}),document.head.appendChild(e)}async function pmLoadDelayedScripts(e){var t=e.shift();return t?(await pmReplaceScript(t),pmLoadDelayedScripts(e)):Promise.resolve()}async function pmReplaceScript(e){return await pmNextFrame(),new Promise(function(t){let n=document.createElement("script");[...e.attributes].forEach(function(e){let t=e.nodeName;"type"!==t&&("data-perfmatters-type"===t&&(t="type"),n.setAttribute(t,e.nodeValue))}),e.hasAttribute("src")?(n.addEventListener("load",t),n.addEventListener("error",t)):(n.text=e.text,t()),e.parentNode.replaceChild(n,e)})}async function pmTriggerEventListeners(){pmDOMLoaded=!0,await pmNextFrame(),document.dispatchEvent(new Event("perfmatters-DOMContentLoaded")),await pmNextFrame(),window.dispatchEvent(new Event("perfmatters-DOMContentLoaded")),await pmNextFrame(),document.dispatchEvent(new Event("perfmatters-readystatechange")),await pmNextFrame(),document.perfmattersonreadystatechange&&document.perfmattersonreadystatechange(),await pmNextFrame(),window.dispatchEvent(new Event("perfmatters-load")),await pmNextFrame(),window.perfmattersonload&&window.perfmattersonload(),await pmNextFrame(),jQueriesArray.forEach(function(e){e(window).trigger("perfmatters-jquery-load")});let e=new Event("perfmatters-pageshow");e.persisted=window.pmPersisted,window.dispatchEvent(e),await pmNextFrame(),window.perfmattersonpageshow&&window.perfmattersonpageshow({persisted:window.pmPersisted})}async function pmNextFrame(){return new Promise(function(e){requestAnimationFrame(e)})}function pmReplayClicks(){window.removeEventListener("touchstart",pmTouchStartHandler,{passive:!0}),window.removeEventListener("mousedown",pmTouchStartHandler),pmInterceptedClicks.forEach(e=>{e.target.outerHTML===pmClickTarget&&e.target.dispatchEvent(new MouseEvent("click",{view:e.view,bubbles:!0,cancelable:!0}))})}function pmWaitForPendingClicks(){return new Promise(e=>{window.pmIsClickPending?pmPendingClickFinished=e:e()})}function pmPndingClickStarted(){window.pmIsClickPending=!0}function pmPendingClickFinished(){window.pmIsClickPending=!1}function pmClickHandler(e){e.target.removeEventListener("click",pmClickHandler),pmRenameDOMAttribute(e.target,"pm-onclick","onclick"),pmInterceptedClicks.push(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),pmPendingClickFinished()}function pmTouchStartHandler(e){"HTML"!==e.target.tagName&&(pmClickTarget||(pmClickTarget=e.target.outerHTML),window.addEventListener("touchend",pmTouchEndHandler),window.addEventListener("mouseup",pmTouchEndHandler),window.addEventListener("touchmove",pmTouchMoveHandler,{passive:!0}),window.addEventListener("mousemove",pmTouchMoveHandler),e.target.addEventListener("click",pmClickHandler),pmRenameDOMAttribute(e.target,"onclick","pm-onclick"),pmPendingClickStarted())}function pmTouchMoveHandler(e){window.removeEventListener("touchend",pmTouchEndHandler),window.removeEventListener("mouseup",pmTouchEndHandler),window.removeEventListener("touchmove",pmTouchMoveHandler,{passive:!0}),window.removeEventListener("mousemove",pmTouchMoveHandler),e.target.removeEventListener("click",pmClickHandler),pmRenameDOMAttribute(e.target,"pm-onclick","onclick"),pmPendingClickFinished()}function pmTouchEndHandler(e){window.removeEventListener("touchend",pmTouchEndHandler),window.removeEventListener("mouseup",pmTouchEndHandler),window.removeEventListener("touchmove",pmTouchMoveHandler,{passive:!0}),window.removeEventListener("mousemove",pmTouchMoveHandler)}function pmRenameDOMAttribute(e,t,n){e.hasAttribute&&e.hasAttribute(t)&&(event.target.setAttribute(n,event.target.getAttribute(t)),event.target.removeAttribute(t))}window.pmIsClickPending=!1,window.addEventListener("pageshow",e=>{window.pmPersisted=e.persisted}),pmUserInteractions.forEach(function(e){window.addEventListener(e,pmTriggerDOMListener,{passive:!0})}),pmDelayClick&&(window.addEventListener("touchstart",pmTouchStartHandler,{passive:!0}),window.addEventListener("mousedown",pmTouchStartHandler)),document.addEventListener("visibilitychange",pmTriggerDOMListener);</script></body> </html> <!-- This website is like a Rocket, isn't it? Performance optimized by WP Rocket. Learn more: https://wp-rocket.me - Debug: cached@1744760972 -->