WordPress数据库错误: [Got error 28 from storage engine]
SHOW FULL COLUMNS FROM `wp_options`

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (13) ORDER BY t.name ASC

PHP截取中文字符串方法 – Crazy knowledge base
Crazy knowledge base

PHP截取中文字符串方法

截取UTF-8中文字符串
$str = “OpenFullSizeWindow使用时将上面的代码放在网页文档的标记对中,然后在链接的点击事件中调用OpenFullSizeWindow函数”;
echo cut_str($str, 22);

function cut_str($msg,$cut_size,$charset="UTF-8",$suffix="...") {
	if($cut_size<=0) return $msg;
	$i=1;$han=0;$eng=0;
	while ($i <= strlen($msg)) {
		if(ord($msg[($i-1)])>127){
			$han++;
			if($charset=="UTF-8"){
				$i=$i+3;
			}else{
				$i=$i+2;
			}
		}else{
			$eng++;
			$i=$i+1;
		}
		if(($han+$eng)==$cut_size){
			if($charset=="UTF-8"){
				$cut_size = $eng + (int)$han*3;
			}else{
				$cut_size = $eng + (int)$han*2;
			}
			break;
		}
	}
	for ($i=0;$i<$cut_size;$i++) {
		$str .=$msg[$i];
	}
	return $str.$suffix;
}
PHP截取中文字符串方法

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (12) ORDER BY t.name ASC

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (16) ORDER BY t.name ASC

滚动到顶部