-1
우리는 동적 게시물이 우리가 URL을변환 배열 (분할 3 자)
$this->post_message = "THIS IS SAMPLE STRING FOR TEST";
if (strlen($this->post_message) > 5) {
$key='<> ";,/\][{}|`~!#$%^&*_+=-';
$bodypost1 =trim($this->post_message,$key);
$bodypost2 = explode (' ',$bodypost1,3);
$bodypost = array_shift(',',$bodypost2);
}else{
$bodypost2 = explode (' ',$this->post_message,3);
$bodypost = array_shift(',',$bodypost2);
}
에 사용하기 위해 문자열의 3 개 단어를 분할해야하며,이 URL 매개 변수
$this->permalink = $C->SITE_URL.'view/'.($type=='private'?'priv':'post').':'.$this->post_id.'/'.$bodypost.'.html';
내 URL입니다 위로 :
sitename.com/123/THIS.html
하지만
sitename.com/123/THIS되어야 SAMPLE.ht IS ml의
을 당신은'$ this-> post_message'의 처음 세 단어를 얻으려면? 그냥 명확히 .. – Vainglory07
예, 나는 $ this-> post_message의 3 단어를 전나무 싶어. – user3261715