$newmainviewquery=mysql_query("select * from news_main_view where id=1");
$newmainviewrow=mysql_fetch_array($newmainviewquery);
$nsresult=mysql_query("select * from news where id=$newmainviewrow[idnum]"); //////////////////////////// id 번호 수정할것
while ($nsrow=mysql_fetch_array($nsresult))
{
$nsstorytitle=htmlspecialchars($nsrow[title]);
$nsstorycomment=htmlspecialchars($nsrow[comment]);
$nsstorynocomment=htmlspecialchars($nsrow[comment]);
$nsstorycomment = ereg_replace("<img","",$nsstorycomment);
$nsstorynocomment = ereg_replace("<img","",$nsstorynocomment);
// 제목 글자수 자르기
$length0=$newmainviewrow[title_word]; ///////////////////////////////////////////////////////////////////////// 필요할 경우 수정
mb_internal_encoding('UTF-8');
$nsstorytitle= mb_strimwidth($nsstorytitle,0,$length0); // mb_strimwidth, mb_substr
// 그림 있는 내용 글자수 자르기
$length1=$newmainviewrow[img_yes_content_word]; ///////////////////////////////////////////////////////////////////////// 필요할 경우 수정
mb_internal_encoding('UTF-8');
$nsstorycomment= mb_strimwidth($nsstorycomment,0,$length1); // mb_strimwidth, mb_substr
// 그림 없는 내용 글자수 자르기
$length2=$newmainviewrow[img_no_content_word]; ///////////////////////////////////////////////////////////////////////// 필요할 경우 수정
mb_internal_encoding('UTF-8');
$nsstorynocomment= mb_strimwidth($nsstorynocomment,0,$length2); // mb_strimwidth, mb_substr
$nsstoryfilename=$nsrow[filename];
if($nsstoryfilename) {
?>
| | |