½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
CSS
html
mysql
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 161 | Á¶È¸¼ö 3,253 | µî·ÏÀÏ 2006-02-17 19:03:28

´Ð³×ÀÓ

HappyCGI

À̸ÞÀÏ

webmaster@happycgi.com

Á¦¸ñ

[´äº¯] µðºñ¿¡¼­ Á¦¸ñ ÃßÃâ½Ã ±ÛÀÚ¼ö Á¦ÇÑÇÏ´Â ¹æ¹ýÁ»....
³»¿ë
[9988´Ô ¿øº»±Û]

¾Æ·¡¼Ò½º´Â Á¦·Îº¸µå¿¡¼­ »ç¿ëÇϸ鼭 ƯÁ¤ °Ô½ÃÆÇ¿¡¼­ ÀÓÀÇ·Î ±Û Á¦¸ñÀ» ÇÑ°³ ÃßÃâÇÏ¿© ÇØ´ç °Ô½Ã¹°À» ÀÐÀ»¼ö ÀÖµµ·Ï

¸µÅ©¸¦ °Å´Â ³»¿ëÀÔ´Ï´Ù. Á¦¸ñÀÌ ¼ö½ÊÀÚ°¡ µÇ´Â °æ¿ì¿¡ Å×À̺íÀÌ µÚƲ¾îÁö°Å³ª ÁٹٲÞÀÌ ÀϾ³×¿ä

Á¦¸ñ Ãâ·Â½Ã ±ÛÀÚ¼ö¸¦ ÁöÁ¤ÇÏ¿© Á¦ÇÑµÈ ±ÛÀÚ¼ö°¡ ÃÊ°úÇÏÁö ¸øÇÏ´Â ¹ý ºÎŹµå¸³´Ï´Ù ^^

// ------------------------------------------------

<table width="155">
    <tr>
        <td align="right" width="150" nowrap><nobr>¢¹

<?
mysql_connect("localhost","¾ÆÀ̵ð","µðºñºñ¹ø");
mysql_select_db("µðºñ³×ÀÓ");


 $zb_url = "Á¦·Îº¸µå°æ·Î";

$bbs_name="see"; // see´Â °Ô½ÃÆǾÆÀ̵ð

// µ¥ÀÌÅ͸¦ ºÒ·¯¿È
$result=mysql_query("SELECT * FROM zetyx_board_".$bbs_name." ORDER BY rand() LIMIT 1");

// Ãâ·Â
while($data=mysql_fetch_array($result)) {
$subject= $data[subject];
echo"<a href='".$zb_url."zboard.php?id=see&page=$href&no=$data[no]'>".$subject."</a>"; // see´Â °Ô½ÃÆÇ ¾ÆÀ̵ð

}
?>

 </nobr></td>
    </tr>
</table>
//---------------------------------------------



ÇØÇÇCGI ÀÔ´Ï´Ù.

$subject= $data[subject]; ¿ä³ðÀ» ÀÚ¸£´Â°Ô ¸ñÇ¥±º¿ä.
¾Æ·¡ functionÀ» Á¦·Îº¸µåÀÇ ÀÎŬ·çµÇ´Â php ÆÄÀÏÀ̳ª ÇöÀç ÆÄÀÏÀÇ ¸Ç³¡ (?>) ¹Ù·ÎÀ§¿¡ ºÙ¿©³Ö½À´Ï´Ù.

function kstrcut($str, $len, $suffix){
 if ($len >= strlen($str)) return $str;
 $klen = $len - 1;
 while(ord($str[$klen]) & 0x80) $klen--;
 return substr($str, 0, $len - (($len + $klen + 1) % 2)) . $suffix;
}


´ÙÀ½ $subject= $data[subject]; ºÎºÐ¾Æ·¡ ÇÑÁÙ Ãß°¡ÇÕ´Ï´Ù.
$subject = kstrcut($subject, '30', "..."); #30ÀÚ·Î ±ÛÀÚ¸¦ ÀÚ¸¥´Ù.

ÁÁÀº ÇÏ·çµÇ¼¼¿ä.

Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û µðºñ¿¡¼­ Á¦¸ñ ÃßÃâ½Ã ±ÛÀÚ¼ö Á¦ÇÑÇÏ´Â ¹æ¹ýÁ».... 2006-02-17 18:03:51
´ÙÀ½°Ô½Ã±Û ¿î¿µÀÚ´Ô µµ¿ÍÁÖ¼¼¿ä! 2006-02-17 23:08:33