문의합니다. 정보
문의합니다.본문
http://www.sir.co.kr/bbs/tb.php/g4_skin/9867 이 스킨을 썼는데요...
한 페이지에 세개게시판의 최신글에 똑같은 new_img1스킨을 쓰니 첫번째 게시판 최신글은 제대로 나오고 두번째 게시판 최신글부터 아래와 같은 에러가 뜹니다. 무슨 이유인지요? 답장 부탁드립니다.
Fatal error: Cannot redeclare showtextintags() (previously declared in E:\Vhost\WebRoot\tbci\www\skin\latest\new_img\latest.skin.php:76) in E:\Vhost\WebRoot\tbci\www\skin\latest\new_img\latest.skin.php on line 76
댓글 전체
re =는 다시
declare = 선언
즉 중복선언된 경우입니다.
showtextintags() 함수를
latest.skin.php 에서 잘라내시고
latest.lib.php 에 붙여넣으시고 업로드.
declare = 선언
즉 중복선언된 경우입니다.
showtextintags() 함수를
latest.skin.php 에서 잘라내시고
latest.lib.php 에 붙여넣으시고 업로드.
latest.skin.php
<?##########################################
function showtextintags($text)
{
$text = preg_replace("/(\<script)(.*?)(script>)/si", "dada", "$text");
$text = strip_tags($text);
$text = str_replace("<!--", "<!--", $text);
$text = preg_replace("/(\<)(.*?)(--\>)/mi", "".nl2br("\\2")."", $text);
return $text;
}
##########################################
?>
지우시고
latest.lib.php
에 아무 곳에나
붙여 넣으세요
<?##########################################
function showtextintags($text)
{
$text = preg_replace("/(\<script)(.*?)(script>)/si", "dada", "$text");
$text = strip_tags($text);
$text = str_replace("<!--", "<!--", $text);
$text = preg_replace("/(\<)(.*?)(--\>)/mi", "".nl2br("\\2")."", $text);
return $text;
}
##########################################
?>
<?##########################################
function showtextintags($text)
{
$text = preg_replace("/(\<script)(.*?)(script>)/si", "dada", "$text");
$text = strip_tags($text);
$text = str_replace("<!--", "<!--", $text);
$text = preg_replace("/(\<)(.*?)(--\>)/mi", "".nl2br("\\2")."", $text);
return $text;
}
##########################################
?>
지우시고
latest.lib.php
에 아무 곳에나
붙여 넣으세요
<?##########################################
function showtextintags($text)
{
$text = preg_replace("/(\<script)(.*?)(script>)/si", "dada", "$text");
$text = strip_tags($text);
$text = str_replace("<!--", "<!--", $text);
$text = preg_replace("/(\<)(.*?)(--\>)/mi", "".nl2br("\\2")."", $text);
return $text;
}
##########################################
?>
고맙습니다..^^ 수고하셨어요~
다른 분들도 쓰시다가 에러 부분이 있을것 같은데 다시 수정판을 올리시면 않될까요? 귀찮으시면 제가 대신 올려드릴께요^^
if(!function_exists('showtextintags'))
{
function showtextintags($text)
{
$text = preg_replace("/(\<script)(.*?)(script>)/si", "dada", "$text");
$text = strip_tags($text);
$text = str_replace("<!--", "<!--", $text);
$text = preg_replace("/(\<)(.*?)(--\>)/mi", "".nl2br("\\2")."", $text);
return $text;
}
}
{
function showtextintags($text)
{
$text = preg_replace("/(\<script)(.*?)(script>)/si", "dada", "$text");
$text = strip_tags($text);
$text = str_replace("<!--", "<!--", $text);
$text = preg_replace("/(\<)(.*?)(--\>)/mi", "".nl2br("\\2")."", $text);
return $text;
}
}