latest 파일 관련 내용 추출 질문입니다.

latest 파일 관련 내용 추출 질문입니다.

QA

latest 파일 관련 내용 추출 질문입니다.

본문


<tr>
<?
for ($i=0; $i<count($list); $i++)
{
    if ($i == 0)
        echo '<td width=0></td>';
		else if ($i == 6)
        echo "</tr><tr><td width=1> </td>";
    $title = get_text($list[$i][subject]);
	 $title = cut_str($title, 28);
    $content = cut_str(get_text($list[$i][wr_content]), 80);
    $img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
    if (!file_exists($img) || !$list[$i][file][0][file])
        $img = "$latest_skin_path/img/no_image.gif";
    $href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
		$list[$i]['href'] = "$h_page?no={$list[$i]['wr_id']}";
 
    echo <<<HEREDOC
    <td valign='top'>
 
			<table border"0" align="left">
			<tr>
			<td></td>
			</tr>
 
			<tr>
			<td>
			<div style='width:95px;height:auto;border:1px solid #CCCCCC;padding:2px'>
			<a href='{$list[$i]['href']}'><img src='{$img}' width='95' height='auto' border='0' align='absmiddle' title='$title'></a>
			</div>
			<td>&nbsp<a href='{$list[$i]['href']}'><font color='#000000'><?php echo cut_str(strip_tags($list[$i]['wr_content']), 10); ?></font></a></td>
			</tr>
			</table>
 
    </td>
HEREDOC;
}
?>
</tr>

 

<?php echo cut_str(strip_tags($list[$i]['wr_content']), 10); ?> 

 

이부분 함수가 노출이 안되는데 왜 그럴까요?

이 질문에 댓글 쓰기 :

답변 3

<?php 문이 중복으로 사용되었고, echo 가 이미 위에서 사용되었기 때문에 

 

<?php echo cut_str(strip_tags($list[$i]['wr_content']), 10); ?> 

 

을 


{$content} 


로 변수만 출력해 주시면 됩니다.


$content = cut_str(get_text($list[$i][wr_content]), 80);


글자수를 조정하시려면 올려주신 소스 11라인의 위 코드에서 "80" 숫자를 조정하시면 됩니다.

이미 위에서 한번 처리를 한것 같은데..

echo $content  해보시구요...

 

사용상에 $content 이부분을 달리 표현할려고 한거면

strip_tags 이부분은 get_text 로 바꿔서 해보세요 

답변을 작성하시기 전에 로그인 해주세요.
전체 123,663 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT