This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//检测字符串是否是utf-8编码 | |
if(mb_detect_encoding($content,"UTF-8, ISO-8859-1, GBK, gb2312") !== 'UTF-8') | |
{ | |
$content = iconv("gbk","utf-8",$content); | |
} | |
//转换文件为utf-8编码的文件,如果该文件开始即为utf-8,则不会做任何处理 | |
enca -L zh_CN -x UTF-8 $script_dir/../upload/text/$1.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery Tiny Pub/Sub - v0.6 - 1/10/2011 | |
* http://benalman.com/ see https://gist.github.com/661855 | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
* | |
* (removed pre 1.4.3 support, added $.pubsubdebug()) | |
*/ |
NewerOlder