组保留的标签 余下为需要删除的标签
unset($oldtag[$key]);
}
}
}
if (!empty($oldtag)) {
$tagids = array();
foreach ($oldtag as $tagid => $tagname) {
$tagids[] = $tagid;
}
well_oldtag_delete($tagids, $tid);
}
$r = well_tag_process($tid, $fid, $create_tag, $tagarr);
return $r;
}
// 删除标签和绑定的主题
function well_oldtag_delete($tagids, $tid)
{
$pagesize = count($tagids);
$arrlist = well_tag_find_by_tagids($tagids, 1, $pagesize);
$delete_tagids = array(); // 删除
$tagids = array();
$n = 0;
foreach ($arrlist as $val) {
++$n;
if (1 == $val['count']) {
// 只有一个主题
$delete_tagids[] = $val['tagid'];
} else {
$tagids[] = $val['tagid'];
}
}
!empty($delete_tagids) and well_tag_delete($delete_tagids);
$arlist = well_tag_thread_find_by_tid($tid, 1, $n);
if ($arlist) {
$ids = array();
foreach ($arlist as $val) $ids[] = $val['id'];
well_tag_thread_delete($ids);
}
!empty($tagids) and well_tag_update($tagids, array('count-' => 1));
}
// 标签数据处理 $arr=新提交的数组 $tagarr=保留的旧标签
function well_tag_process($tid, $fid, $new_tags = array(), $tagarr = array())
{
if (empty($tid)) return '';
// 新标签处理入库
if ($new_tags) {
$threadarr = array();
$tagids = array();
$i = 0;
$size = 5;
$n = count($tagarr);
$n = $n > $size ? $size : $size - $n;
foreach ($new_tags as $name) {
++$i;
$name = trim($name);
$name = stripslashes($name);
$name = strip_tags($name);
$name = str_replace(array(' ', '#', "@", "$", "%", "^", '&', '·', '<', '>', ';', '`', '~', '!', '¥', '……', ';', '?', '?', '-', '—', '_', '=', '+', '.', '{', '}', '|', ':', ':', '、', '/', '。', '[', ']', '【', '】', '‘', ' ', ' ', ' ', ' ', ' '), '', $name);
$name = htmlspecialchars($name, ENT_QUOTES);
if ($name && $i <= $n) {
// 查询标签
$read = well_tag_read_name($name);
if ($read) {
// 存在 count+1
$tagids[] = $read['tagid'];
} else {
// 入库
$arr = array('name' => $name, 'count' => 1);
$tagid = well_tag_create($arr);
FALSE === $tagid and message(-1, lang('create_failed'));
$read = array('tagid' => $tagid, 'name' => $name);
}
$tag_thread = array('tagid' => $read['tagid'], 'tid' => $tid);
$threadarr[] = $tag_thread;
$tagarr[$read['tagid']] = $read['name'];
}
}
!empty($threadarr) and tag_thread_big_insert($threadarr);
!empty($tagids) and well_tag_update($tagids, array('count+' => 1));
}
$json = empty($tagarr) ? '' : xn_json_encode($tagarr);
return $json;
}
?>
如何手动安装驱动更新?-阿南达文事网
如何手动安装驱动更新?
编程日记10
更新时间:2025-05-26 09:12:35 如何手动安装驱动更新?
方法一:通过设备管理器手动安装驱动程序
- 步骤:
- 打开“设备管理器”:
- 找到需要更新驱动程序的硬件设备(如显示适配器、音频设备等)。
- 右键单击该设备,选择“更新驱动程序”。
- 选择“浏览我的计算机以查找驱动程序软件”。
- 点击“让我从计算机上的可用驱动程序列表中选择”。
- 浏览到驱动程序文件所在的文件夹(通常为下载的驱动程序解压后的路径)。
- 选择合适的驱动程序版本,点击“下一步”完成安装。
方法二:从硬件制造商官网下载并安装驱动程序
- 步骤:
- 访问硬件设备的制造商官网(如显卡制造商NVIDIA、AMD或Intel)。
- 根据您的操作系统版本和硬件型号,下载对应的驱动程序。
- 运行下载的安装程序,按照提示完成安装。
方法三:使用第三方工具管理驱动程序
- 推荐工具:
- Driver Booster:
- Snappy Driver Installer:
- 步骤:
- 下载并安装上述工具之一。
- 打开工具并扫描缺失或过时的驱动程序。
- 选择需要安装的驱动程序,点击“安装”按钮。
方法四:通过命令行安装驱动程序
- 适用场景: 高级用户可以使用命令行工具安装驱动程序。
- 步骤:
- 打开“命令提示符”(管理员权限):
- 按下
Win + X
键,选择“Windows终端(管理员)”或“命令提示符(管理员)”。
- 使用
pnputil
命令安装驱动程序包:pnputil /add-driver "驱动程序路径" /install - 示例:pnputul /add-driver "C:\Drivers\example.inf" /install
方法五:卸载现有驱动程序后重新安装
- 步骤:
- 打开“设备管理器”:
- 找到需要更新驱动程序的硬件设备。
- 右键单击该设备,选择“卸载设备”。
- 勾选“删除此设备的驱动程序软件”,然后点击“卸载”。
- 重启计算机,系统会自动重新安装默认驱动程序。
- 如果需要,从硬件制造商官网下载并安装最新版本的驱动程序。
本文发布于:2025-05-26,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何手动安装驱动更新
发布评论