-
-
require("config.php");
- require_once 'Tags.php';
- $sql = "SELECT tags FROM demo"; //在这里你可以随机或者限制一下取出的个数.
- $rs = $db->query($sql);
- while ($tags = $db->fetch_array($rs)) {
- $arr[] = split("\|",iconv("gb2312","utf-8",$tags['tags']));
- }
- $tags = new Tags($arr);
- $tagsArr = $tags->getTags();
- $tagsStr = '';
- foreach ($tagsArr as $value){
- $tagsStr .= urlencode(''.$value.'');
- }
- $tagsStr .= '
';
- ?>
复制代码
js代码部分:
|