주소에서 http:// 없애는 방법좀 ... > 그누3질답

그누3질답

주소에서 http:// 없애는 방법좀 ... 정보

그누보드 주소에서 http:// 없애는 방법좀 ...

본문

<?if ($link[$i][link1]) {?>
  <a href='<?=$link[$i][link_href1]?>' title='<?=$list[$i][subject]?>' target=_blank>
  <?=set_http(get_text(cut_str($link[$i][link2], 45)))?>
  </a>
<?}?>

링크2주소를 링크1의 주소로 이동하게끔 했는데요.
메인화면에서 주소가  http://www.sir.co.kr 이런식으로 보이는데....
좀더 깔끔하게하려구 http://  <---- 이부분을 없애구 싶은데 어떻게 해야되죠?

댓글 전체

gblist.skin.php파일이구요.

<?=get_text(sub_str($link[$i][link2],7,45))?> 이걸루 하니깐 아래의 에러가 뜹니다.
Fatal error: Call to undefined function: sub_str() in e:\rio\cart\bbs\skin\board\cart\gblist.skin.php on line 72


gblist.skin.php파일이구요.

<?
$user_max_img=$width-20;  // 이미지 가로폭 최대 크기
$king_secret="<font color=#9EB8CC>이 글은 비밀글 입니다. </font>";  // 비밀글일때 표시할 내용.
$cmt_width=$width-150; //코멘트 테이블크기
?>
<style>.wings {padding:5 5 0 5; line-height:19px; }</style>
<table width='<?=$width?>' align=center border=0 cellpadding=0 cellspacing=0>
<tr>
<td  width="190" valign="top">
<!------ 좌측 소분류 + 글쓰기 시작 ---------->
<table width="190" border="0" cellpadding="0" cellspacing="0">
    <form name=fcategory method=get action='<?="./"?>'>
    <input type=hidden name=doc value='<?=$doc?>'>
<tr>
<td width="190" height=600 valign="top" background='http://localhost/cart/bbs/skin/board/cart/main_left_bg.gif'>
<br><br>
    <?
if ($is_category) {
echo "<input type=hidden name=ca_id>";
echo get_category_list("$cfg[write_table_prefix]$bo_table",$category_location);
}
?>
</td>
    </form>
</tr>
<TR><TD>
<? if ($admin_href) { echo "<a href='$admin_href'>a</a>&nbsp;"; } ?>
<? if ($write_href) { echo "<a href='$write_href'>w</a>&nbsp;"; } ?>
</TD></TR>
</table>
<!------ 좌측 소분류 + 글쓰기 끝 ---------->
</td>
<td width="4"></td>
<td width=1 background="http://localhost/index_images/right_block.gif"></td>
<td valign="top">
<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td height=1 background="http://localhost/index_images/right_block.gif"></td></tr></table>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<input type=hidden name=bo_table value='<?=$bo_table?>'>
<input type=hidden name=sselect  value='<?=$sselect?>'>
<input type=hidden name=stext    value='<?=$stext?>'>
<input type=hidden name=section  value='<?=$section?>'>
<input type=hidden name=page    value='<?=$page?>'>

<? for ($i=0; $i<count($list); $i++) { // 리스트 반복 시작 ?>
<? include "$board_skin/_set.php"; ?>
<tr>
<td>
<!------ 수정 + 삭제 + 게시물내용 시작------>
<TABLE width=100% height=70 border=0 cellpadding=0 cellspacing=0 style='table-layout:fixed;'>
<TR><TD width=90></TD><TD width=1></TD><TD align=right>
<? if ($update_href) { echo "<a href=\"$update_href\">m</a>&nbsp;";} ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\">d</a>&nbsp;";} ?>
</TD></TR>
<TR>
<TD width=90 class=wings>
<?if ($link[$i][link1]) {?>
<a href='<?=$link[$i][link_href1]?>' target=_blank>
<span><?=$list[$i][subject]?></span>
</a>
<?}?>
</TD>
<td width=1 background="http://localhost/index_images/right_block.gif"></td>
<TD  valign="top" class=wings>


########################    이부분입니다      .######################
<?if ($link[$i][link1]) {?>
<a href='<?=$link[$i][link_href1]?>' title='<?=$list[$i][subject]?>' target=_blank>
<?=get_text(sub_str($link[$i][link2],7,45))?>
</a>
<?}?>


<br>
<?
$it_is_secret=0;  // 지금문서가..비밀글인지..

if( $list[$i][file_image1] ) // 이미지가 있을때..크기 설정
{
    $size=GetImageSize($list[$i][file_image1]);

    $img_x_size=$size[0];
    $img_y_size=$size[1];
      $per=1;

    if( $img_x_size > $user_max_img  )
    {
      $per = $user_max_img / $img_x_size;
      $img_x_size=$user_max_img;
      $img_y_size=$img_y_size*$per;
      $size = "width = $img_x_size height = $img_y_size";
    }
    }

if($list[$i][wr_secret]&&!$is_admin)  //관리자는 내용이 바로 보이게
$it_is_secret=1;
?>
<?
if($it_is_secret) echo $king_secret;
else
{
        if($list[$i][file_image1])
echo "<a href=\"javascript:;\" OnClick=\"popupImage('{$list[$i][file_image1]}')\" onFocus=\"this.blur();\"><img src='{$list[$i][file_image1]}' $size  style='border-color:#333333;' border=1></a><p>";
  echo "<span class='tt'>{$list[$i][content]}</span><br>";
}
?>
</TD>
</TR>
</TABLE>
<!------ 수정 + 삭제 + 게시물내용 끝------>
</td>
</tr>
<tr><td height=1 background="http://localhost/index_images/right_block.gif" colspan=3></td></tr>
<? } // 리스트 반복 끝 ?>
</table>

<table width=100%>
<tr><td align=left>
        <? if ($prev_section_href) { echo "<a href='$prev_section_href'>이전검색</a>"; } ?>
        <?=$write_pages?>
        <? if ($next_section_href) { echo "<a href='$next_section_href'>다음검색</a>"; } ?>
  </td></tr>
</table>

<? if ($stext) { ?>
    <script language='JavaScript'>
        if ('<?=$sselect?>' == 'ca_id') {
            document.fcategory.ca_id.value = '<?=$stext?>';
            document.fsearch.stext.value = '';
        } else {
            document.fsearch.sselect.value  = '<?=$sselect?>';
        }
</script>
<? } ?>

</td>
<td width=1 background="http://localhost/index_images/right_block.gif"></td>
</tr>
</table>

<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=yes,width=100,height=100,top=100,left=50");
  imageHandle.document.write("<title>Image View</title>");
  imageHandle.document.write("<style>");
  imageHandle.document.write("*{margin:0;padding:0;border:0;}");
  imageHandle.document.write("</style>");
  imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+9,this.height+28);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}

function show_cmt_write(name, id) {
var layer = document.getElementById(name+id);
layer.style.display = (layer.style.display == "none")? "block" : "none";
}
</script>
전체 9,564
그누3질답 내용 검색

회원로그인

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