테이블 태그 점검하기 정보
기타 테이블 태그 점검하기
본문
글쓰기 내용중에 테이블 태그를 검사하여 불완전할 경우 소스로 보여줍니다.
<? $a= substr_count("$content", "<table>");
$b= substr_count("$content", "</table>");
$c= substr_count("$content", "<tr>");
$d= substr_count("$content", "</tr>");
$e= substr_count("$content", "<td>");
$f= substr_count("$content", "</td>");
if ($a == $b && $c == $d && $e == $f) {
echo $content; }
else {
echo conv_content($content, 0);
echo "<br><br><b>TAG Error ! : Html 태그가 맞지 않습니다. 확인해 주세요 ^^</b> }
?>
<? $a= substr_count("$content", "<table>");
$b= substr_count("$content", "</table>");
$c= substr_count("$content", "<tr>");
$d= substr_count("$content", "</tr>");
$e= substr_count("$content", "<td>");
$f= substr_count("$content", "</td>");
if ($a == $b && $c == $d && $e == $f) {
echo $content; }
else {
echo conv_content($content, 0);
echo "<br><br><b>TAG Error ! : Html 태그가 맞지 않습니다. 확인해 주세요 ^^</b> }
?>
추천
0
0
댓글 전체
음.....소문자 태그만 체크하는군요...대문자 태그까지 체크를 하려면 어떻게??
좋은 팁 감사합니다.

호~
근데 이거 어떻게 사용하는거에요?
좋은 팁이군요. 스킨 만들때 필요했던 겁니다.

gbview.skin.php 에서 적용하는 겁니다.