그누보드 내용관리에서 내용이 없으면 출력을 않하게 할려면은 어떻게 해야되나요? 채택완료
파트라슈님
3년 전
조회 1,915
현재 메인에 출력해서 사용중인데요.
guide_contact --> 내용관리에서 생성한 ID값
내용이 없으면 메인에 노출을 않하고 싶어서요.. ㅠ
<?php if ($co['guide_contact']) { ?>
<div>sssssss<?php
$sql = " select * from {$g5['content_table']} where co_id = 'guide_contact' ";
$co = sql_fetch($sql);
echo conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);
?></div></p>
<p>
<?php } else { ?>
빈내용이면 출력않함
<?php } ?>
댓글을 작성하려면 로그인이 필요합니다.
답변 3개
채택된 답변
+20 포인트
마르스컴퍼니
Expert
3년 전
</p>
<p><?php
$sql = " select * from {$g5['content_table']} where co_id = 'guide_contact' ";
$co = sql_fetch($sql);
?>
<?php if ($co['co_content']) { ?>
<div>
<?php echo conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']); ?>
</div>
<?php } ?></p>
<p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
�
파트라슈님
3년 전
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
�
파트라슈님
3년 전
아래처럼 적용했는데 guide_contact 내용이 들어있는 상태인데 노출이 안되요 ㅠㅠ
제가 잘못적은걸까요?
[code]<?php if(!empty($co['guide_contact'])) { ?>
<div>sssssss<?php
$sql = " select * from {$g5['content_table']} where co_id = 'guide_contact' ";
$co = sql_fetch($sql);
echo conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);
?></div>
<?php } else { ?>
빈내용이면 출력않함
<?php } ?>
[/code]
제가 잘못적은걸까요?
[code]<?php if(!empty($co['guide_contact'])) { ?>
<div>sssssss<?php
$sql = " select * from {$g5['content_table']} where co_id = 'guide_contact' ";
$co = sql_fetch($sql);
echo conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);
?></div>
<?php } else { ?>
빈내용이면 출력않함
<?php } ?>
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
[code]<?php isset($co['guide_contact']) && trim($co['guide_contact']) != "" { ?>
<div>sssssss<?php
$sql = " select * from {$g5['content_table']} where co_id = 'guide_contact' ";
$co = sql_fetch($sql);
echo conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);
?></div>
<?php } else { ?>
빈내용이면 출력않함
<?php } ?> [/code]