[급] 쏘스좀 봐주세요. rss 출력에 관해서.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

[급] 쏘스좀 봐주세요. rss 출력에 관해서.. 정보

[급] 쏘스좀 봐주세요. rss 출력에 관해서..

본문

rss 출력이 잘 안되네요..

되다 안되다 ㅠㅠ

소스는..
---------------------------------------------------------------------------------------
<?php
include_once("./_common.php");

$rows = "20";

$xmlDoc .= "";

$xmlDoc .= "<?xml version=\"1.0\" encoding=\"$g4[charset]\"?>\n";
$xmlDoc .= "\n";
$xmlDoc .= "\n";
$xmlDoc .= "doctorW : 최신기사\n";
$xmlDoc .= "http://doctorw.kr\n";
$xmlDoc .= "대화와 소통의 창 닥터W\n";
$xmlDoc .= "ko \n";

$tmp_re=sql_query("select ct_idx, ct_name from $g4[category_table] where ct_parent='$ct_idx' and ct_idx!='$ct_idx'");

for($k=0;$tmp=sql_fetch_array($tmp_re);$k++){
$ct_idxs.=" or ct_idx=$tmp[ct_idx]";
}

$status = "3";
$headine = "and pd_status='".$status."' ";
$condition=" ( ct_idx='$ct_idx' $ct_idxs ) $headine ";
$condition.=" order by ".(($ct_idx)?"pd_idx desc":"pd_parent desc,pd_reno asc");

$sql = " select * from $g4[product_table] where $condition , pd_datetime_end limit 0, $rows ";
$result = sql_query($sql);

for ($i=0;$row=sql_fetch_array($result); $i++) {

$like ="$g4[url]/news/view.php?pd_idx=$row[pd_idx] ";
$pd_title1 = strip_tags($row[pd_title1]);

$xmlDoc .= " \n";
$xmlDoc .= " $pd_title1\n";//제목
$xmlDoc .= " $like\n";//링크
$xmlDoc .= " ".cut_str(strip_tags($row[pd_content]),20000,"..")."\n";//내용
$xmlDoc .= " $row[pd_saledate]\n"; // 입력날짜
$xmlDoc .= " \n\n";
}


$xmlDoc .= "\n";
$xmlDoc .= "\n";


$fp = fopen("$g4[path]/rss/rss.xml","w");

fwrite($fp, $xmlDoc);

fclose($fp);
?>

---------------------------------------------------------------------------------------

인데요 되다 안되다 하구..

어떻게 해야 할까요? ㅠㅠ
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로