php分页查询mysql结果base64处理
publicfunction public_about(){
$sql= "SELECTc.catid,c.catname,c.catdir,FROM_BASE64(p.content) FROM v9_page p JOINv9_category c ON c.catid=p.catid WHERE c.parentdir = 'jmwm/'";
if(isset($_REQUEST['biaoshi'])){
$sql= "SELECTc.catid,c.catname,c.catdir,p.content FROM v9_page p JOIN v9_category c ONc.catid=p.catid WHERE c.catdir LIKE '{$_REQUEST['biaoshi']}%'";
}
$mydb= pc_base::load_model('mymodel');
$mpages= $mydb->query_listinfo($sql);
$this->array_to_base64($mpages);
// $article['content']=base64_encode(toUtf8($article['content']));
$msg= array();
$msg['returncode']= "0";
$msg['msg']= togbk("关于联系");
$msg['comment']= $mpages;
echo jsonFormat($msg);
// return_Msg(0,"关于联系",$mpages);
}
publicfunction array_to_base64(&$array){
foreach($array as $key => $value) {
if(is_array($value)) {
$this->array_to_base64($array[$key]);
} elseif($key=="content"){
$array[$key]=base64_encode(toUtf8($value));
}else{
$array[$key]=togbk($value);
}
}
}
文章来源: blog.csdn.net,作者:网奇,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/jacke121/article/details/55297955
- 点赞
- 收藏
- 关注作者
评论(0)