테이블 태그 점검하기
글쓰기 내용중에 테이블 태그를 검사하여 불완전할 경우 소스로 보여줍니다.
<? $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> }
?>
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 6개