PHP 에서 한글/영어 길이 맞춰서 자르기
function utf8_strcut( $str, $size ) { $substr = substr( $str, 0, $size * 2 ); $multi_size = preg_match_all( '/[\\x80-\\xff]/', $substr, $multi_chars ); if ( $multi_size > 0 ) $size = $size + intval( $multi_size / 3 ) - 1; if ( strlen( $str ) > $size ) { $str = substr( $str, 0, $size ); $str = preg_replace( '/(([\\x80-\\xff]{3})*?)([\\x80-\\xff]{0,2})$/', '$1', $str ); $str .= '...'; } return $st..
더보기
소셜보내기
function openNewsWin(openUrl) { var winObj; winObj = window.open(openUrl,"sendNewsWin","width=1024, height=800"); } function openNewsWin2(openUrl) { var winObj; winObj = window.open(openUrl,"sendNewsWin","width=700, height=600, scrollbars=yes, resizable=yes, menubar=yes, toolbar=yes, statusbar=yes"); } function openNewsWin3(openUrl) { var winObj; winObj = window.open(openUrl,"sendNewsWin","width..
더보기