From be2f6dcab81f47be4fedbe7089c5642f9dca1675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EC=84=A0=EA=B7=BC?= Date: Wed, 18 Jul 2018 16:36:14 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9C=98=ED=8C=8C=EB=9E=8C=EB=B3=B4=EB=93=9C?= =?UTF-8?q?=201.1.4=20-=20=EA=B8=80=20=EC=9A=94=EC=95=BD=EB=B3=B8=EC=9D=84?= =?UTF-8?q?=20=EA=B0=80=EC=A0=B8=EC=98=A4=EB=8A=94=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wheeparam/application/helpers/common_helper.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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); +}