欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php分頁查詢mysql結果的base64處理方法示例

 更新時間:2017年05月18日 12:02:44   作者:ShellCollector  
這篇文章主要介紹了php分頁查詢mysql結果的base64處理方法,涉及php+mysql數(shù)據(jù)庫查詢及base64編碼轉換相關操作技巧,需要的朋友可以參考下

本文實例講述了php分頁查詢mysql結果的base64處理方法。分享給大家供大家參考,具體如下:

public function 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("關于聯(lián)系");
   $msg['comment']= $mpages;
   echo jsonFormat($msg);
// return_Msg(0,"關于聯(lián)系",$mpages);
}
public function 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);
    }
  }
}

PS:這里再為大家提供幾款比較實用的base64在線編碼解碼工具供大家使用:

BASE64編碼解碼工具:
http://tools.jb51.net/transcoding/base64

在線圖片轉換BASE64工具:
http://tools.jb51.net/transcoding/img2base64

Base64在線編碼解碼 UTF-8版:
http://tools.jb51.net/tools/base64_decode-utf8.php

Base64在線編碼解碼 gb2312版:
http://tools.jb51.net/tools/base64_decode-gb2312.php

更多關于PHP相關內容感興趣的讀者可查看本站專題:《php+mysql數(shù)據(jù)庫操作入門教程》、《php+mysqli數(shù)據(jù)庫程序設計技巧總結》、《php面向對象程序設計入門教程》、《PHP數(shù)組(Array)操作技巧大全》、《php字符串(string)用法總結》、《PHP網(wǎng)絡編程技巧總結》及《php常見數(shù)據(jù)庫操作技巧匯總

希望本文所述對大家PHP程序設計有所幫助。

相關文章

最新評論