當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FORMAT::parse_attachs2方法代碼示例

本文整理匯總了PHP中FORMAT::parse_attachs2方法的典型用法代碼示例。如果您正苦於以下問題:PHP FORMAT::parse_attachs2方法的具體用法?PHP FORMAT::parse_attachs2怎麽用?PHP FORMAT::parse_attachs2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FORMAT的用法示例。


在下文中一共展示了FORMAT::parse_attachs2方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_all_question

 public function get_all_question()
 {
     // return "helloword23333333";
     if ($result = $this->fetch_all('question', "", "update_time DESC")) {
         foreach ($result as $key => $val) {
             $data[$key]['question_info'] = $val;
             // here should parse answer_content for get img url directly by anxiang.xiao 20150827
             $data[$key]['question_info']['question_detail'] = $this->model('question')->parse_at_user(FORMAT::parse_attachs2(nl2br(FORMAT::parse_bbcode($data[$key]['question_info']['question_detail']))));
             $data[$key]['question_publish_user_info'] = $this->fetch_row('users', 'uid = ' . $val['published_uid']);
             if ($data[$key]['question_publish_user_info']['avatar_file']) {
                 $data[$key]['question_publish_user_info']['avatar_file'] = get_avatar_url($data[$key]['question_publish_user_info']['uid'], 'min');
             }
             $data[$key]['category_info'] = $this->fetch_row('category', 'id = ' . $val['category_id']);
             $data[$key]['question_newest_answer_info'] = $this->fetch_row('answer', 'question_id = ' . $val['question_id'], "add_time DESC");
             /*
             				 *
             				 * $data[$key]['question_info'] = $val;
             
             if ($val['published_uid'] != 0)
             $data[$key]['question_publish_user_info'] =  $this->fetch_row('users','uid = ' .$val['published_uid'] );
             else
             $data[$key]['question_publish_user_info'] =  "{}";
             
             if ($val['category_id'] != 0)
             $data[$key]['category_info'] =  $this->fetch_row('category','id = ' .$val['category_id'] );
             else
             $data[$key]['category_info'] =  "{}";
             */
         }
         return $data;
         // return  $posts_index;
     }
 }
開發者ID:lincoln2015,項目名稱:18duchengxuyuan_server,代碼行數:33,代碼來源:test.php

示例2: get_answer_info_action

 public function get_answer_info_action()
 {
     if (isset($_GET['answer_id'])) {
         $answer_id = trim($_GET['answer_id']);
     }
     $question_answer = $this->model('test')->get_answer_by_id($answer_id);
     // here should parse answer_content for get img url directly by anxiang.xiao 20150827
     $question_answer['answer_content'] = $this->model('question')->parse_at_user(FORMAT::parse_attachs2(nl2br(FORMAT::parse_bbcode($question_answer['answer_content']))));
     echo json_encode($array = array("value" => $question_answer));
 }
開發者ID:lincoln2015,項目名稱:18duchengxuyuan_server,代碼行數:10,代碼來源:ajax.php


注:本文中的FORMAT::parse_attachs2方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。