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

´Ð³×ÀÓ

sunny97

À̸ÞÀÏ

orange123@orgio.net

Á¦¸ñ

mkdir µð·ºÅ丮 ¸¸µé±â
³»¿ë

Àú ¶ÇÇϳª ±Ã±ÝÇÑ°ÍÀÌ ÀÖ½À´Ï´Ù.
my %all = ();

open (fp, "data.txt");
while (<fp>) {
    chomp;
    s/^\s*"//g;
    s/"\s*$//g;
    s/\s*"\s*,\s*"\s*/","/g;
    @arr = split( /","/,$_);
    $all{ $arr[6] }{ $arr[7] }{ $arr[8] } = 1;

 }

close fp;

my %dir = ();
my $count = 0;


my %addr1 = ();

print ">>Top (output/) <<\n";
foreach $k1 ( keys %all )
{
        $addr1{$k1} = 1;
        $dir{ $k1 } = $count++;


        my %addr2 = ();
        $sub1 = $all{$k1};

        #print ">> $k1 (/output/$dir{$k1}) <<\n";
        foreach $k2 ( keys %$sub1 )
        {
            $addr2{$k2} = 1;
            $dir{ $k2 } =$count++;

            my %addr3 = ();
            $sub2 = $sub1->{$k2};


            #print ">> $k1 > $k2 (/output/$dir{$k1}/$dir{$k2}) <<\n";
            foreach $k3 ( keys %$sub2 )
            {
                $dir{ $k2 } = $count++    ;
                        $addr3{$k3} = 1  ;


            #print "$k3 (/search?addr1=$k1&addr2=$k2&addr3=$k3)\n";

            }


            # print "\n\n";


            #print "$k2 (/output/$dir{$k1}/$dir{$k2})\n";


       }

        #print "\n\n";

print "$k1 (/output/$dir{$k1})\n";

open ( fp, ">index.htm") || die "failed opening.\n";

foreach $k1 (keys %all){
print fp <<END_HTML;       
<a href =$dir{$k1}> $k1 </a><br>
END_HTML

}


close fp;
}

print "\n\n";


¿ì¼± ½ÇÇàÇغ¸½Ã¸é topÆäÀÌÁö¿¡ ³ª¿Ã°Íµé.. ±×·¯´Ï±î ¹è¿­ 6¿¡ ³ª¿À´Â°ÍµéÀÌ Á× ¸®½ºÆõ˴ϴÙ.µ¥ÀÌÅÍ ÆÄÀÏÀÌ ÈξÀ ¸¹¾Æ ¾Æ·¡Ã³·³ ³ª¿À´Âµ¥¿ä..
>> Top (output/) <<==>°æ»óºÏµµ((/output/1) ÀÎõ±¤¿ª½Ã((/output/25) ´ë±¸±¤¿ª½Ã((/output/49) °­¿øµµ((/output/57) ¿ï»ê±¤¿ª½Ã((/output/66) Àü¶ó³²µµ((/output/69) ½Åµµ½Ã((/output/72) ±¤ÁÖ±¤¿ª½Ã((/output/79) °æ±âµµ((/output/194) Ãæû³²µµ((/output/82) ´ëÀü±¤¿ª½Ã((/output/253) ºÎ»ê±¤¿ª½Ã((/output/245) °æ»ó³²µµ((/output/209) ¼­¿ïƯº°½Ã((/output/404) ÃæûºÏµµ((/output/411)

À̰͵éÀ» ÇÑ htmlÆÄÀÏ¿¡ ÀúÀåÇÏ¿´½À´Ï´Ù.

±×·±µ¥ ÀÌÁ¦ µð·ºÅ丮 »ý¼ºÀ» ÇؾßÇÕ´Ï´Ù.
ù ÆäÀÌÁö´Â »ý¼ºÇÒ ÇÊ¿ä¾øÀÌ index.htmlÀÌÁö¸¸, 2depthºÎÅÍ´Â °æ»óºÏµµ´Â /output/1À̶ó´Â µð·ºÅ丮¸¦ ÀÎõ±¤¿ª½Ã´Â /output/25¶ó´Â µð·ºÅ丮¸¦ »ý¼ºÇØÁÖ¾î¾ß Çϴµ¥¿ä.
fuctionÀ» ¸¸µé¾î¼­ ÀÚµ¿À¸·Î ¸¸µé¾îÁö°Ô ÇÒ¼ö ÀÖÀ»±î¿ä?

mkdirÀ̶ó´Â ÇÔ¼ö¸¦ ÀÌ¿ëÇÏ´Â°Í °°Àºµ¥. ¾îÂî ÇؾßÇÒÁö °¨ÀÌ ÀâÈ÷Áö ¾Ê½À´Ï´Ù.
Ã¥¿¡¼­µµ ÀÚ¼¼È÷ ³ª¿Í ÀÖÁö ¾Ê±¸¿ä..

µµ¿ò Á» ºÎŹµå¸³´Ï´Ù.

Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
HappyCGI 2003-11-06 11:54:57
´ä±Û

system("mkdir Æú´õ¸í > /dev/null");
À§ ó·³ ¾²½Ã¸é µË´Ï´Ù.

ÀÌÀü°Ô½Ã±Û splitÇϱâÀü ±Ã±ÝÇÑ°ÍÀÌ ÀÖ½À´Ï´Ù. 2003-11-05 15:40:20
´ÙÀ½°Ô½Ã±Û list box¸¦ ÀÌ¿ëÇؼ­ textarea ¿­±â 2003-11-06 14:33:27