效果图如下

该插件附带了一个可以把产品描述里面的超链接给去掉,以及有的产品图片点击会在地址栏上面显示图片的路径,在该插件可以进行关闭,并且替换成一个模态窗,还有对产品邮费展示进行了处理,到金额到达包邮的时候,别的邮费进行隐藏

下面是该插件源码
目录结构
duola
  duola.php
  scripts.js
  styles.css

duola.php文件

<?php
/*
Plugin Name: 产品数据内容处理
Description: 产品标题以及描述中,如果有原本网站的数据,使用这个插件进行处理(新版本功能:增加了产品详情,给产品图片新增了一个模态窗,以及产品隐藏其他运费增加了一个快捷按钮和产品描述去超链接)
Version: 2.3.4
Author: 朵啦
*/ if (!defined('ABSPATH')) {
exit; // 如果直接访问,退出
} class ContentReplacer {
public function __construct() {
// 添加后台菜单
add_action('admin_menu', array($this, 'add_admin_menu'));
// 处理表单提交
add_action('admin_post_replace_content', array($this, 'handle_form_submission'));
// 处理回滚
add_action('admin_post_rollback_content', array($this, 'handle_rollback'));
// 处理免运费隐藏按钮的表单提交
add_action('admin_post_toggle_shipping', array($this, 'handle_toggle_shipping'));
// 处理产品模态窗按钮的表单提交
add_action('admin_post_toggle_modal', array($this, 'handle_toggle_modal')); add_action('admin_post_toggle_hyperlink', array($this, 'handle_toggle_hyperlink'));
add_action('admin_post_close_hyperlink', array($this, 'handle_close_hyperlink')); // 检查简码状态的AJAX处理
add_action('wp_ajax_check_shortcode_status', array($this, 'check_shortcode_status'));
// 添加样式和脚本
add_action('admin_enqueue_scripts', array($this, 'enqueue_styles'));
} // 添加后台菜单项
public function add_admin_menu() {
add_menu_page(
'产品数据内容处理', // 页面标题
'产品数据内容处理', // 菜单标题
'manage_options', // 权限
'content-replacer', // 菜单别名
array($this, 'create_admin_page'), // 页面内容的回调函数
'dashicons-admin-tools' // 图标
);
} public function enqueue_styles() {
wp_enqueue_style('content-replacer-styles', plugins_url('styles.css', __FILE__));
wp_enqueue_script('content-replacer-scripts', plugins_url('scripts.js', __FILE__), array('jquery'), null, true);
wp_add_inline_style('content-replacer-styles', '
#adminmenu .toplevel_page_content-replacer .wp-menu-image:before {
content: "";
display: inline-block;
width: 20px;
height: 20px;
background-image: url(' . plugins_url('img/icon.png', __FILE__) . ');
background-size: cover;
}
');
} // 创建后台页面
public function create_admin_page() {
?>
<div class="wrap content-replacer-container">
<h1>产品数据内容处理</h1>
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" id="content-replacer-form">
<input type="hidden" name="action" value="replace_content">
<?php wp_nonce_field('replace_content_nonce', 'replace_content_nonce_field'); ?>
<table class="form-table">
<tr valign="top">
<th scope="row"><label for="original_text">原始内容</label></th>
<td><input type="text" id="original_text" name="original_text" required /></td>
</tr>
<tr valign="top">
<th scope="row"><label for="new_text">新内容</label></th>
<td><input type="text" id="new_text" name="new_text" required /></td>
</tr>
</table>
<p class="submit"><input type="submit" class="button-primary" value="替换内容" /></p>
<div id="loading" class="loading">正在处理中,请稍候...</div>
<div class="progress-bar" id="progress-bar">
<div class="progress-bar-inner" id="progress-bar-inner"></div>
</div>
</form> <h2>替换历史</h2>
<ul>
<?php
$history = get_option('content_replacer_history', array());
if (empty($history)) {
echo '<li>还没有进行过替换。</li>';
} else {
$history_by_date = [];
foreach ($history as $entry) {
$date = date('Y-m-d H:i:s', strtotime($entry['date']));
if (!isset($history_by_date[$date])) {
$history_by_date[$date] = ['entries' => [], 'count' => 0];
}
$history_by_date[$date]['entries'][] = '"' . esc_html($entry['original_text']) . '" 替换为 "' . esc_html($entry['new_text']) . '"';
$history_by_date[$date]['count'] += $entry['replacements'];
} foreach ($history_by_date as $date => $data) {
$entries = array_unique($data['entries']); // 去除重复项
echo '<li>';
echo '于 ' . esc_html($date) . ' 替换: ';
echo implode(', ', $entries);
echo ' 共 ' . $data['count'] . ' 处改动 ';
echo ' <a href="' . wp_nonce_url(admin_url('admin-post.php?action=rollback_content&date=' . urlencode($date)), 'rollback_content_nonce', 'rollback_content_nonce_field') . '">回滚</a>';
echo '</li>';
}
}
?>
</ul>
</div> <div class="wrap content-replacer-container"> <!-- 新按钮:免运费隐藏 -->
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" id="shipping-toggle-form">
<input type="hidden" name="action" value="toggle_shipping">
<?php wp_nonce_field('toggle_shipping_nonce', 'toggle_shipping_nonce_field'); ?>
<p class="submit"><input type="submit" class="button-primary" id="toggle-shipping-button" value="免运费隐藏" /></p>
</form> <!-- 新按钮:产品模态窗 -->
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" id="modal-toggle-form">
<input type="hidden" name="action" value="toggle_modal">
<?php wp_nonce_field('toggle_modal_nonce', 'toggle_modal_nonce_field'); ?>
<p class="submit"><input type="submit" class="button-primary" id="toggle-modal-button" value="产品模态窗" /></p>
</form> <!-- 新按钮:去产品超链接 -->
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" id="hyperlink-toggle-form">
<input type="hidden" name="action" value="toggle_hyperlink">
<?php wp_nonce_field('toggle_hyperlink_nonce', 'toggle_hyperlink_nonce_field'); ?>
<p class="submit"><input type="submit" class="button-primary" id="toggle-hyperlink-button" value="检查中..." /></p>
</form> <!-- 新按钮:关闭描述去超链接功能 -->
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" id="hyperlink-close-form" style="display:none;">
<input type="hidden" name="action" value="close_hyperlink">
<?php wp_nonce_field('close_hyperlink_nonce', 'close_hyperlink_nonce_field'); ?>
<p class="submit"><input type="submit" class="button-primary" id="close-hyperlink-button" value="关闭描述去超链接功能" /></p>
</form> </div>
<script>
jQuery(document).ready(function($) {
$('#content-replacer-form').on('submit', function() {
$('#loading').hide();
$('#progress-bar').show();
var progressBar = $('#progress-bar-inner');
var width = 0;
var interval = setInterval(function() {
if (width >= 100) {
clearInterval(interval);
$('#progress-bar').hide();
} else {
width += 1; // 增加进度的步长
progressBar.css('width', width + '%');
progressBar.text(width + '%');
}
}, 50); // 模拟进度,逐步增加
}); // 隐藏其他插件提示
$('.notice, .update-nag, .updated, .error, .is-dismissible').not('.content-replacer-container .notice').hide(); // 检查 function.php 中是否有相关简码
$.ajax({
url: ajaxurl,
data: {
'action': 'check_shortcode_status'
},
success: function(response) {
if (response.shipping_hidden) {
$('#toggle-shipping-button').val('其他运费已隐藏');
}
if (response.modal_enabled) {
$('#toggle-modal-button').val('产品图片模态窗已开启');
}
if (response.hyperlinks_exist) {
$('#toggle-hyperlink-button').val('描述有超链接,点击去掉').css({
'background-color': '#ff6666',
'color': '#f5f5dc'
}).prop('disabled', false);
} else {
$('#toggle-hyperlink-button').val('产品无链接,无需点击此按钮').css({
'background-color': '#add8e6',
'color': '#ffffff'
}).prop('disabled', true);
}
}
}); // 当去掉超链接按钮被点击
$('#hyperlink-toggle-form').on('submit', function() {
$('#toggle-hyperlink-button').val('超链接已去掉,无需点击此按钮').prop('disabled', true);
$('#close-hyperlink-button').parent().show();
}); // 当关闭超链接功能按钮被点击
$('#hyperlink-close-form').on('submit', function() {
$('#toggle-hyperlink-button').val('描述有超链接,点击去掉').prop('disabled', false);
$('#close-hyperlink-button').parent().hide();
}); });
</script>
<?php
} // 处理表单提交
public function handle_form_submission() {
if (!isset($_POST['replace_content_nonce_field']) || !wp_verify_nonce($_POST['replace_content_nonce_field'], 'replace_content_nonce')) {
wp_die('Nonce 验证失败');
} if (!current_user_can('manage_options')) {
wp_die('无权限');
} $original_text = sanitize_text_field($_POST['original_text']);
$new_text = sanitize_text_field($_POST['new_text']); global $wpdb; // 获取所有产品
$products = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt FROM {$wpdb->posts} WHERE post_type = 'product'"); // 在替换前保存原始数据
$history = get_option('content_replacer_history', array());
$total_replacements = 0;
foreach ($products as $product) {
$original_data = array(
'ID' => $product->ID,
'post_title' => $product->post_title,
'post_content' => $product->post_content,
'post_excerpt' => $product->post_excerpt,
);
$title_replacements = substr_count($product->post_title, $original_text);
$content_replacements = substr_count($product->post_content, $original_text);
$excerpt_replacements = substr_count($product->post_excerpt, $original_text);
$total_replacements += $title_replacements + $content_replacements + $excerpt_replacements;
$history_entry = array(
'date' => current_time('mysql'),
'original_text' => $original_text,
'new_text' => $new_text,
'data' => $original_data,
'replacements' => $total_replacements,
);
array_unshift($history, $history_entry); // 添加到数组开头
}
update_option('content_replacer_history', $history); // 执行替换操作
foreach ($products as $product) {
$updated_post = array(
'ID' => $product->ID,
'post_title' => str_replace($original_text, $new_text, $product->post_title),
'post_content' => str_replace($original_text, $new_text, $product->post_content),
'post_excerpt' => str_replace($original_text, $new_text, $product->post_excerpt),
);
$wpdb->update(
$wpdb->posts,
$updated_post,
array('ID' => $product->ID)
);
} wp_redirect(admin_url('admin.php?page=content-replacer'));
exit;
} // 处理回滚操作
public function handle_rollback() {
if (!isset($_GET['rollback_content_nonce_field']) || !wp_verify_nonce($_GET['rollback_content_nonce_field'], 'rollback_content_nonce')) {
wp_die('Nonce 验证失败');
} if (!current_user_can('manage_options')) {
wp_die('无权限');
} $date = urldecode($_GET['date']);
$history = get_option('content_replacer_history', array()); // 筛选出指定日期的历史记录
$entries_to_rollback = array_filter($history, function($entry) use ($date) {
return date('Y-m-d H:i:s', strtotime($entry['date'])) === $date;
}); if (!empty($entries_to_rollback)) {
global $wpdb;
foreach ($entries_to_rollback as $entry) {
$original_data = $entry['data'];
$wpdb->update(
$wpdb->posts,
array(
'post_title' => $original_data['post_title'],
'post_content' => $original_data['post_content'],
'post_excerpt' => $original_data['post_excerpt'],
),
array('ID' => $original_data['ID'])
);
} // 移除已回滚的历史记录
$history = array_filter($history, function($entry) use ($date) {
return date('Y-m-d H:i:s', strtotime($entry['date'])) !== $date;
});
update_option('content_replacer_history', $history); wp_redirect(admin_url('admin.php?page=content-replacer'));
exit;
} else {
wp_die('无效的历史记录日期');
}
} // 处理免运费隐藏按钮的表单提交
public function handle_toggle_shipping() {
if (!isset($_POST['toggle_shipping_nonce_field']) || !wp_verify_nonce($_POST['toggle_shipping_nonce_field'], 'toggle_shipping_nonce')) {
wp_die('Nonce 验证失败');
} if (!current_user_can('manage_options')) {
wp_die('无权限');
} $function_code = "
function js_hide_all_shipping_when_free_is_available( \$shipping_rates ) {
foreach ( \$shipping_rates as \$key => \$rate ) {
if ( \$rate->get_method_id() == 'free_shipping' ) {
\$shipping_rates = array( \$key => \$rate );
}
}
return \$shipping_rates;
}
add_filter( 'woocommerce_package_rates', 'js_hide_all_shipping_when_free_is_available' );
"; $functions_path = get_template_directory() . '/functions.php';
$functions_content = file_get_contents($functions_path); if (strpos($functions_content, 'js_hide_all_shipping_when_free_is_available') === false) {
file_put_contents($functions_path, $functions_content . PHP_EOL . $function_code);
} else {
$functions_content = str_replace($function_code, '', $functions_content);
file_put_contents($functions_path, $functions_content);
} wp_redirect(admin_url('admin.php?page=content-replacer'));
exit;
} // 处理产品模态窗按钮的表单提交
public function handle_toggle_modal() {
if (!isset($_POST['toggle_modal_nonce_field']) || !wp_verify_nonce($_POST['toggle_modal_nonce_field'], 'toggle_modal_nonce')) {
wp_die('Nonce 验证失败');
} if (!current_user_can('manage_options')) {
wp_die('无权限');
} $function_code = "
function theme_enqueue_scripts_and_styles() {
wp_enqueue_style('custom-style', get_stylesheet_directory_uri() . '/css/custom-style.css');
wp_enqueue_script('custom-script', get_template_directory_uri() . '/js/custom-script.js', array('jquery'), null, true);
\$inline_script = \"jQuery(document).ready(function($) {
\$('body').append('<div id=\\\"myModal\\\" class=\\\"modal\\\"><span class=\\\"close\\\">&times;</span><img class=\\\"modal-content\\\" id=\\\"img01\\\"></div>'); var modal_css = '<style>\
.modal {display: none; position: fixed; z-index: 1000; padding-top: 100px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.9);}\
.modal-content {margin: auto; display: block; max-width: 40%; transition: transform 0.3s;}\
.close {position: absolute; top: 15px; right: 35px; color: white; font-size: 40px; font-weight: bold; cursor: pointer;}\
</style>';
\$('head').append(modal_css); var isZoomed = false; \$('.woocommerce-product-gallery__image a').click(function(event) {
event.preventDefault();
var imgSrc = \$(this).find('img').attr('src');
\$('#img01').attr('src', imgSrc);
\$('#myModal').css('display', 'block');
isZoomed = false;
\$('#img01').css('transform', 'scale(1)');
}); \$('.close, .modal').on('click', function(event) {
if (event.target !== this) return;
\$('#myModal').css('display', 'none');
}); \$('#img01').on('dblclick', function() {
if (isZoomed) {
\$(this).css('transform', 'scale(1)');
isZoomed = false;
} else {
\$(this).css('transform', 'scale(2)');
isZoomed = true;
}
});
});
\"; wp_add_inline_script('custom-script', \$inline_script);
} add_action('wp_enqueue_scripts', 'theme_enqueue_scripts_and_styles');
"; $functions_path = get_template_directory() . '/functions.php';
$functions_content = file_get_contents($functions_path); if (strpos($functions_content, 'theme_enqueue_scripts_and_styles') === false) {
file_put_contents($functions_path, $functions_content . PHP_EOL . $function_code);
} else {
$functions_content = str_replace($function_code, '', $functions_content);
file_put_contents($functions_path, $functions_content);
} wp_redirect(admin_url('admin.php?page=content-replacer'));
exit;
} // 处理去产品超链接按钮的表单提交
public function handle_toggle_hyperlink() {
if (!isset($_POST['toggle_hyperlink_nonce_field']) || !wp_verify_nonce($_POST['toggle_hyperlink_nonce_field'], 'toggle_hyperlink_nonce')) {
wp_die('Nonce 验证失败');
} if (!current_user_can('manage_options')) {
wp_die('无权限');
} $function_code = "
function remove_product_hyperlinks(\$content) {
if (is_product()) {
\$content = preg_replace('/<a href=\".*?\">(.*?)<\/a>/', '\$1', \$content);
}
return \$content;
}
add_filter('the_content', 'remove_product_hyperlinks');
"; $functions_path = get_template_directory() . '/functions.php';
$functions_content = file_get_contents($functions_path); if (strpos($functions_content, 'remove_product_hyperlinks') === false) {
file_put_contents($functions_path, $functions_content . PHP_EOL . $function_code);
} wp_redirect(admin_url('admin.php?page=content-replacer'));
exit;
} // 处理关闭去超链接功能按钮的表单提交
public function handle_close_hyperlink() {
if (!isset($_POST['close_hyperlink_nonce_field']) || !wp_verify_nonce($_POST['close_hyperlink_nonce_field'], 'close_hyperlink_nonce')) {
wp_die('Nonce 验证失败');
} if (!current_user_can('manage_options')) {
wp_die('无权限');
} $functions_path = get_template_directory() . '/functions.php';
$functions_content = file_get_contents($functions_path);
$function_code = "
function remove_product_hyperlinks(\$content) {
if (is_product()) {
\$content = preg_replace('/<a href=\".*?\">(.*?)<\/a>/', '\$1', \$content);
}
return \$content;
}
add_filter('the_content', 'remove_product_hyperlinks');
"; if (strpos($functions_content, 'remove_product_hyperlinks') !== false) {
$functions_content = str_replace($function_code, '', $functions_content);
file_put_contents($functions_path, $functions_content);
} wp_redirect(admin_url('admin.php?page=content-replacer'));
exit;
} // 新增 AJAX 处理函数,检测简码状态
// 新增 AJAX 处理函数,检测产品描述中的超链接状态
public function check_shortcode_status() {
$functions_path = get_template_directory() . '/functions.php';
$functions_content = file_get_contents($functions_path); $response = array(
'shipping_hidden' => strpos($functions_content, 'js_hide_all_shipping_when_free_is_available') !== false,
'modal_enabled' => strpos($functions_content, 'theme_enqueue_scripts_and_styles') !== false,
'hyperlinks_exist' => false
);
global $wpdb;
$products = $wpdb->get_results("SELECT post_content FROM {$wpdb->posts} WHERE post_type = 'product'");
foreach ($products as $product) {
if (preg_match('/<a href=\".*?\">/', $product->post_content)) {
$response['hyperlinks_exist'] = true;
break;
}
} wp_send_json($response);
}
} // 实例化插件类
new ContentReplacer();

scripts.js文件

// scripts.js

jQuery(document).ready(function($) {
$('#content-replacer-form').on('submit', function() {
$('#loading').show();
});
// 隐藏其他插件提示
$('.notice, .update-nag, .updated, .error, .is-dismissible').not('.content-replacer-container .notice').hide(); // 提交表单时显示 loading 动画
$('#shipping-toggle-form, #modal-toggle-form').on('submit', function() {
$('#loading').show();
}); // 检查 function.php 中是否有相关简码
$.ajax({
url: ajaxurl,
data: {
'action': 'check_shortcode_status'
},
success: function(response) {
if (response.shipping_hidden) {
$('#toggle-shipping-button').val('其他运费已隐藏');
}
if (response.modal_enabled) {
$('#toggle-modal-button').val('产品图片模态窗已开启');
}
if (response.hyperlinks_exist) {
$('#toggle-hyperlink-button').val('描述有超链接,点击去掉').css({
'background-color': '#ff6666',
'color': '#f5f5dc'
}).prop('disabled', false);
} else {
$('#toggle-hyperlink-button').val('产品无链接,无需点击此按钮').css({
'background-color': '#add8e6',
'color': '#ffffff'
}).prop('disabled', true);
} }
}); // 当去掉超链接按钮被点击
$('#hyperlink-toggle-form').on('submit', function() {
$('#toggle-hyperlink-button').val('超链接已去掉,无需点击此按钮').prop('disabled', true);
$('#close-hyperlink-button').parent().show();
}); // 当关闭超链接功能按钮被点击
$('#hyperlink-close-form').on('submit', function() {
$('#toggle-hyperlink-button').val('描述有超链接,点击去掉').prop('disabled', false);
$('#close-hyperlink-button').parent().hide();
});
});

styles.css文件

/* styles.css */

/* 渐变背景色 */
.content-replacer-container {
background: linear-gradient(135deg, #f9f1e9, #f5e0d3);
padding: 20px;
border-radius: 10px;
color: #333;
max-width: 800px;
margin: 50px auto;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: center;
} .content-replacer-container h1 {
text-align: center;
margin-bottom: 20px;
font-size: 2em;
} .content-replacer-container .form-table {
width: 100%;
margin: 0 auto;
} .content-replacer-container .form-table th,
.content-replacer-container .form-table td {
padding: 10px;
text-align: left;
} .content-replacer-container input[type="text"] {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
margin-bottom: 10px;
box-sizing: border-box;
} .content-replacer-container .button-primary {
background: #ffba00;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: background 0.3s;
} .content-replacer-container .button-primary:hover {
background: #ff9500;
} .content-replacer-container .loading {
display: none;
text-align: center;
padding: 10px;
margin-top: 20px;
border-radius: 5px;
color: #000; /* 将文字颜色改为黑色 */
font-weight: bold;
} .content-replacer-container .progress-bar {
display: none;
width: 100%;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 5px;
overflow: hidden;
margin-top: 20px;
position: relative;
} .content-replacer-container .progress-bar-inner {
height: 30px;
background-color: #00aaff;
width: 0;
line-height: 30px;
color: #fff;
text-align: center;
white-space: nowrap;
transition: width 0.5s ease; /* 平滑的过渡效果 */
} /* 替换历史样式 */
.content-replacer-container ul {
list-style: none;
padding: 0;
} .content-replacer-container ul li {
background: rgba(255, 255, 255, 0.2);
margin-bottom: 10px;
padding: 10px;
border-radius: 5px;
} .content-replacer-container ul li a {
color: #333;
text-decoration: underline;
cursor: pointer;
transition: color 0.3s;
} .content-replacer-container ul li a:hover {
color: #ffba00;
}

duola.php

WordPress产品导入后内容出现乱码,以及附属一些别的功能的更多相关文章

  1. ajax 一个 gbk 目标后内容乱码的解决方案

    ajax 一个 gbk 目标后,如果内容出现乱码,说明服务器在送出内容时没有指定 charset,ajax 对于没有指定 charset 的 response 默认以 utf-8 来处理,所有出现乱码 ...

  2. (视频) 《快速创建网站》 3.1 WordPress 数据导入

    本文是<快速创建网站>系列的第5篇,如果你还没有看过之前的内容,建议你点击以下目录中的章节先阅读其他内容再回到本文. 访问本系列目录,请点击:http://devopshub.cn/tag ...

  3. mysql导入sql文件,乱码,一个例子

    服务器centos,其他数据库都是utf8都正常能用 网页正常显示 这次导入一个utf8格式数据库文件 结果网页上乱码 在导出的sql文件中,注释部分有些语句也是被mysql考虑的.导出的sql文件, ...

  4. [转]mysql导入导出数据中文乱码解决方法小结

    本文章总结了mysql导入导出数据中文乱码解决方法,出现中文乱码一般情况是导入导入时编码的设置问题,我们只要把编码调整一致即可解决此方法,下面是搜索到的一些方法总结,方便需要的朋友. linux系统中 ...

  5. 关于Oracle字符集在dmp文件导入导出中的乱码影响

    Oracle 在进行dmp备份和还原的时候,服务器端字符集和客户端字符集会对这个过程有较大影响,特别是数据表中存储了中文.存储过程中使用了中文编码(注释)的时候,如果没有处理好字符集的问题,在进行还原 ...

  6. 解决NavicatPremium导入CSV文件中文乱码的问题

    在做数据对接导入的时候对方提供的数据是CSV格式的文件 一开始用Excel打开时发现格式就不对,后来发现只要用Excel打开,就会破坏里面的格式 然后想先用NaviCat导入CSV再转成Excel格式 ...

  7. Jmeter响应内容显示乱码问题的解决办法

    Jmeter在访问接口的时候,响应内容如果有中文可能会显示乱码,原因应该是响应页面没有做编码处理,jmeter默认按照ISO-8859-1编码格式进行解析. 下面把解决步骤列一下: 现象:jmeter ...

  8. 从phpMyAdmin批量导入Excel内容到MySQL(亲测非常简洁有效)

    今天做项目遇到需要用phpMyAdmin批量导入Excel内容到MySQL数据库.分析了我的踏坑经历并且总结一最便捷的一套导入数据的方法,非常实用简洁: 1.修改Excel表的数据,使得Excel中的 ...

  9. 【转】从phpMyAdmin批量导入Excel内容到MySQL(亲测非常简洁有效)

    今天做项目遇到需要用phpMyAdmin批量导入Excel内容到MySQL数据库.分析了我的踏坑经历并且总结一最便捷的一套导入数据的方法,非常实用简洁: 1.修改Excel表的数据,使得Excel中的 ...

  10. IDEA集成Docker插件后出现日志乱码的解决办法

    修改IDEA的vmoptions文件 找到IDEA安装目录的bin目录,在idea.exe.vmoptions和idea64.exe.vmoptions文件中追加以下内容: -Dfile.encodi ...

随机推荐

  1. manim边学边做--立方体和棱柱体

    本篇介绍Manim中创建三维立体的两个常用对象:Cube和Prism. Cube在制作动画时,可以用于展示立体几何中的立方体概念,或者通过旋转.缩放等动画效果来帮助理解三维空间中的几何变换. Pris ...

  2. SAM4MLLM:结合多模态大型语言模型和SAM实现高精度引用表达分割 | ECCV'24

    来源:晓飞的算法工程笔记 公众号,转载请注明出处 论文: SAM4MLLM: Enhance Multi-Modal Large Language Model for Referring Expres ...

  3. delphi12 Android Edit SDK安装

    安装 delphi 12.1 后,编译 FMX Android 程序失败! 查找原因,SDK配置全是叹号! 之前用过SDK Manager.exe,直接打开即可以选择下载,但现在发现没有了,查找资料如 ...

  4. gal game 杂谈——《GINKA》

    gal game 杂谈--<GINKA> 剧情梳理 Ps:女主分为小学阶段和高中阶段,这里称小学阶段为小时候的女主,高中阶段为大女主,分离出来爱的为GINKA(长相是小时候的女主). 1. ...

  5. RMI原理及常见反序列化攻击手法

    这是对网上一些文章和视频的再总结,可以参考以下资料,师傅们分析的都挺详细了,我这就是记录一下师傅们写的博客. 廖雪峰 - 给了简单的小例子,了解即可 B站视频(白师傅) 先知社区(小阳师傅) - 讲的 ...

  6. Collections Framework中的算法(之三)--不可变装饰器相关

    本篇主要讲述Collections类中的unmodifiable相关的方法!这些方法都有一个共同含义就是使用此方法创建的对象都是不可变的!典型的装饰器模式的应用!下面的几篇都是装饰器模式在Java C ...

  7. golang之sync包

    介绍sync包中常用的方法, - sync:提供基本的同步原语(比如Mutex.RWMutex.Locker)和 工具类(Once.WaitGroup.Cond.Pool.Map) - sync/at ...

  8. PHP8新特性

    PHP 8.1 提供的功能 枚举 Fiber(纤维) never 返回类型 readonly 属性 final 类常量 新的 array_is_list() 函数 新的 fsync() 和 fdata ...

  9. Xdebug+Phpstorm远程调试

    开发环境: 本地 Windows10 日常开发使用的环境 装有PHPStorm 远程主机 Linux 服务器 装php-fpm/nginx等所有开发依赖环境 本地可以访问远程主机 但远程主机无法访问本 ...

  10. 网站安全锁-SSL证书

    为了安全起见,现在开发微信服务号和IOS客户端等访问服务器端都要求使用https加密传输. SSL证书是数字证书的一种,类似于驾驶证.护照和营业执照的电子副本.因为配置在服务器上,也称为SSL服务器证 ...