°£´ÜÇѰǵ¥¿ä;;
¿©±â´Ù ¿Ã·ÁµÎ µÉÁö ¸ð¸£°Ú³×¿©;;
¾î´ÀºÐ²²¼ ¸¸µé¾î´Þ¶ó±¸ Çϼż ¿Ã¸³´Ï´Ù;;
Âà´ÔÀÇ °Ô½Ã¹°À» ¼öÁ¤Çؼ ¸¸µé¾ú½À´Ï´Ù
³Ê¹« °£´ÜÇÑ ¼öÁ¤ÀÌ¶ó¼ ºÎ²ô·´³×¿©;;
======================================================
<?
function jju($id, $number)
{
global $dbconn;
if ($dbconn=="")
{
$dbconn=mysql_connect("localhost","¾ÆÀ̵ð","ºñ¹Ð¹øÈ£");
mysql_select_db("DBÀ̸§",$dbconn);
}
$result=mysql_query("select * from zetyx_board_$id order by no desc limit $number",$dbconn);
echo "<table width=100% border=0 cellspacing=0 cellpadding=0>";
while($data=mysql_fetch_array($result))
{
$data[subject] = stripslashes($data[subject]);
$data[reg_date]=date("m/d",$data[reg_date]);//³¯Â¥Ãâ·ÂÇÔ¼öºÎºÐ'¡Û¿ù¡ÛÀÏ'Çü½ÄÀ» ¿øÇϽŴٸé'm¿ùdÀÏ'·Î °íÃÄÁÖ¼¼¿ä
$max = 27; // Á¦¸ñ¿¡³ª¿Ã ±Û ½Ï¶Ò ÀÚ¸£±â
$count = strlen($data[subject]);
if($count >= $max)
{
for ($pos=$max;$pos>0 && ord($new[subject][$pos-1])>=127;$pos--);
if (($max-$pos)%2 == 0)
$data[subject] = substr($data[subject], 0, $max) . "...";
else
$data[subject] = substr($data[subject], 0, $max+1) . "...";
}
else
{
$data[subject] = "$data[subject]";
}
echo "<tr>";
echo "<td align=left height=20><img src='±×¸²°æ·Î/arr.gif'><font color='000000' face='±¼¸²' size='2'>".stripslashes("[$data[reg_date]]")."</font><a href=http://Á¦·Îº¸µå°æ·Î/zboard.php?id=$id&no=$data[no]>".stripslashes("$data[subject]")."</a></td>"; //¾ÆÀÌÄÜ,³¯Â¥,Á¦¸ñ Ãâ·Â
echo "</tr>";
echo "<tr>";
echo "<td align=left height=5><img src='±×¸²°æ·Î/dot.gif'>";//ĸ¶´Ù ³ª¿Ã Á¡¼± À̹ÌÁö
echo "</tr>";
}
echo "</table>";
}
?>
====================================================================
ÀÌ°É XXX.php ÆÄÀÏ·Î ¸¸µå½Ã±¸¿©
ºÒ·¯³¾ html ¹®¼¿¡
<? include"XXX.php"; ?>
<? jju("°Ô½ÃÆÇÀ̸§",ºÒ·¯³¾°Ô½Ã¹°¼ýÀÚ); ?>
ÀÌ·±½ÄÀ¸·ç ÇØÁÖ½Ã¸é µË´Ï´Ù
ÁÖÀÇ»çÇ× ÀÖ½À´Ï´Ù
¸¸¾à ´Ù¸¥ ÇÑ°³´õÀÇ °Ô½ÃÆÇÀ» °°Àº html¿¡ ¹®¼¿¡
ÀÌ °Ô½Ã¹°ÆÄÀÏÀ» ÀÌ¿ëÇؼ ºÒ·¯µéÀ̽Ƕ§´Â
<? jju("°Ô½ÃÆÇÀ̸§",ºÒ·¯³¾°Ô½Ã¹°¼ýÀÚ); ?>
ÀÌ ºÎºÐ¸¸ ½áÁּžßÇÕ´Ï´Ù
ÀÎŬ·çµå¸¦ µÎ¹øÇØÁÖ½Ã°ÔµÇ¸é ¹Ýº¹Çؼ ºÒ·¯µéÀÌ´Â °á°ú°¡ µÇ±â¶§¹®¿¡
Àú ºÎºÐ¸¸ ½áÁÖ½Ã¸é µË´Ï´Ù
½±°Ô Ç¥ÇöÇÏÀÚ¸é ÀÌ·¸°Ô µÇ´Â°ÅÁÒ
===================================
=°øÁö»çÇ×=
<? include"XXX.php"; ?>
<? jju("°Ô½ÃÆÇÀ̸§",ºÒ·¯³¾°Ô½Ã¹°¼ýÀÚ); ?>
=´º½º=
<? jju("°Ô½ÃÆÇÀ̸§",ºÒ·¯³¾°Ô½Ã¹°¼ýÀÚ); ?>
====================================
ÀÌ·±½ÄÀ¸·ç¿ä ^^
¿¹Á¦ÆÄÀÏÀ» ¸µÅ©ÇصѲ²¿©
http://jjuya.freesian.com/php/test.php
±Û±¸ ³ª¿À°Ô µÉ À̹ÌÁö ÆÄÀÏ µÎ°³ ¸µÅ©ÇصΰڽÀ´Ï´Ù
´Ù¿î¹Þ¾Æ¼ »ç¿ëÇϼ¼¿©~
¾ÆÂü ±×¸®±¸ µû·Î ½ºÅ¸ÀÏÀ» Àû¿ëÇصÎÁö ¾Ê¾Ò±â¶§¹®¿¡
»ç¿ëÇÏ°Ô µÉ html¹®¼¿¡
<style type="text/css">
A:link {color:#999999; text-decoration:none; font-size:12px}
A:visited {color:#999999; text-decoration: none; font-size:12px}
A:hover {color:#000000; text-decoration: underline; font-size:12px}
</style>
ÀÌ°É ÇØµÎ½Ã¸é ¿¹Á¦ÆÄÀÏ°ú ¶È°°ÀÌ ³ª¿À°ÔµË´Ï´ç;;;
¹ÌÈíÇÏÁö¸¸ ¸¹Àº µµ¿òµÇ±æ ¹Ù·¡¿©;;
|
|