대표URL이 소스에 적용되게 하고 싶어요

대표URL이 소스에 적용되게 하고 싶어요

QA

대표URL이 소스에 적용되게 하고 싶어요

본문

 

rss.php 내

$buff .= '<link><?php echo specialchars_replace(get_pretty_url($bo_table)); ?></link>'.PHP_EOL;

저의 메인주소를 자동으로 들어가게 하고 싶은데.. 먹히지 않네요..

도움 부탁드립니다.


<?php
include_once "_common.php";
header("Content-type: text/xml;charset=utf-8");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
$limit = 100; // feed 생성 수
$buff = '';
$buff .= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>".PHP_EOL;
$buff .= '<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:activity="http://activitystrea.ms/spec/1.0/" >'.PHP_EOL;
$buff .= '<channel>'.PHP_EOL;
$buff .= '<title><![CDATA['.$config['cf_title'].']]></title>'.PHP_EOL;
$buff .= '<link><?php echo specialchars_replace(get_pretty_url($bo_table)); ?></link>'.PHP_EOL;
$buff .= '<description><![CDATA['.$config['cf_1'].']]></description>'.PHP_EOL;
$buff .= '<language>ko</language>'.PHP_EOL;
  
$Search = " where (1) ";
$Search .= " and wr_is_comment = 0 ";
$SelectBoard = " select bo_table,bo_subject from ".$g5['board_table']." where bo_use_search = 1 ";
$QueryBoard = sql_query($SelectBoard);
while($RowBoard = sql_fetch_array($QueryBoard)){ $ResultSelect[] = "( select *, '".$RowBoard['bo_table']."' as bo_table from ".$g5['write_prefix'].$RowBoard['bo_table'].$Search." )"; }
$ResultQuery = implode(" union all ", $ResultSelect);
$ResultQuery .= " order by wr_datetime desc limit 0 , $limit ";
$Query = sql_query($ResultQuery);
while($Row = sql_fetch_array($Query)){
    
$content = strip_tags($Row['wr_content']);
$content = str_replace(" "," ",$content);
$board = sql_fetch("select bo_subject from g5_board where bo_table = '".$Row['bo_table']."'");
$buff .= "<item>".PHP_EOL;
$buff .= "<category><![CDATA[".$board['bo_subject']."]]></category>".PHP_EOL;
$buff .= "<title><![CDATA[".$Row['bo_subject']." - ".$Row['wr_subject']."]]></title>".PHP_EOL;
$buff .= "<link>".G5_BBS_URL."/board.php?bo_table=".$Row['bo_table']."&wr_id=".$Row['wr_id']."</link>".PHP_EOL;
$buff .= "<description><![CDATA[".mb_strimwidth($content,0,400,'..','utf-8')."]]></description>".PHP_EOL;
$buff .= "<author>".$Row['wr_name']."</author>".PHP_EOL;
$buff .= "<pubDate>".date("D, d M Y H:i:s T", strtotime($Row['wr_datetime']))."</pubDate>".PHP_EOL;
$buff .= "</item>".PHP_EOL;
}
  
$buff .= "</channel>".PHP_EOL;
$buff .= "</rss>";

echo $buff;

?>

이 질문에 댓글 쓰기 :

답변 1


$buff .= '<link>'.specialchars_replace(get_pretty_url($bo_table)).'</link>'.PHP_EOL;
답변을 작성하시기 전에 로그인 해주세요.
전체 2,086
QA 내용 검색
filter #css ×

회원로그인

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