php函数mb_detect_encoding自动识别编码并自动转换成utf8的方法
php中有一个自动识别编码的函数mb_detect_encoding(),下面的代码是探测文章编码并自动转换成utf8的方法 //自动识别编码并自动转换成utf8 /* 爱推吧 http://ituibar.com */ function characet($data){ if(!empty($data)){ $fileType=mb_detect_encoding($date
php中有一个自动识别编码的函数mb_detect_encoding(),下面的代码是探测文章编码并自动转换成utf8的方法
//自动识别编码并自动转换成utf8 /* 爱推吧 http://ituibar.com */ function characet($data){ if(!empty($data)){ $fileType=mb_detect_encoding($date,array('utf-8','GBK','LATIN1','BIG5')); if($fileType !='utf-8'){ $data=mb_convert_encoding($data, 'utf-8',$fileType) ; } } return $date; }
原文地址:php函数mb_detect_encoding自动识别编码并自动转换成utf8的方法, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use