当前位置: 首页>>代码示例>>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;未经允许,请勿转载。