diff --git a/wheeparam/application/helpers/common_helper.php b/wheeparam/application/helpers/common_helper.php index e1f800a..f1b7889 100644 --- a/wheeparam/application/helpers/common_helper.php +++ b/wheeparam/application/helpers/common_helper.php @@ -1257,4 +1257,15 @@ function db_file_delete($table, $pk_column, $pk, $filepath_column) $CI->db->set($filepath_column, ''); $CI->db->where($pk_column, $pk); $CI->db->update($table); -} \ No newline at end of file +} + +/** + * 글 내용 요약본을 가져온다. + * @param string $post_content + * @param int $length + * @return string + */ +function get_post_summary($post_content="", $length=300) +{ + return cut_str( trim( strip_tags($post_content) ) ,$length); +}