![]() ![]() ![]() ![]() |
|||||
|
|||||
¼Ó¥D jimmy413 ![]()
![]() |
¦ý§Ú³]©wªº¸ô®|¦p¹Lª½±µ¥Î®Ú¥Ø¿ýªº¸ô®| °õ¦æ·|Åܦ¨ °O¾ÐÅ餣¨¬ ·Q½Ð°Ý ¬OþÃä²£¥Í¤FµL°j°é°Ú? <% dim TemporaryFiles() function GetFiles(Path, FileCount) Path=("/up/file/111/5") set fs = Server.CreateObject("Scripting.FileSystemObject") realfilepath = (Server.Mappath(Path)) if fs.FolderExists(realfilepath) = true then response.write("¦s¦b")&"<br>" set folder = fs.GetFolder(realfilepath) '±N¥Ø«e¸ê®Æ§¨¤UªºÀɮצWºÙ©ñ¤J°}¦C for each f in folder.files redim preserve TemporaryFiles(2, FileCount+1) TemporaryFiles(0, FileCount) = Path & "/" & f.Name TemporaryFiles(1, FileCount) = f.Name FileCount = FileCount + 1 next ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''¤l¥Ø¿ý ' Ä~Äò§ä¦³¨S¦³¤l¸ê®Æ§¨, ¦³ªº¸Ü, »¼°j±½¸Ì±ªºÀɮשM¸ê®Æ§¨ for each subfolder in folder.SubFolders call GetFiles(Path & "/" & subfolder.Name, FileCount) next set folder = nothing else redim TemporaryFiles(2, 1) TemporaryFiles(0, 0) = "" TemporaryFiles(1, 0) = "The path is not exist !" end if set fs = nothing GetFiles = TemporaryFiles end function '''''''''''''''''''''''''''''''''''''''''''' ' ©I¥s function FileArray = GetFiles("",0) for i = 0 to ubound(FileArray,2) response.write FileArray(0,i) &"<br>" response.write FileArray(1,i) &"<br>" next %>
·j´M¬ÛÃöTagsªº¤å³¹¡G
[ Ū¨ú¸ê®Æ§¨ ] , [ °O¾ÐÅ餣¨¬ ] , [ µL°j°é ] ,
¥»½g¤å³¹µoªí©ó2015-04-23 17:51 |
1¼Ó
³Ì¦³»ùȸѵª
¦Ñ¹xµ£ ![]() ![]() |
Path=("/up/file/111/5")
¬°¤°»ò³o¤@¦æ·|¦bfunctionùØ? Y¬O³oÃ䪺path©³¤UÁÙ¦³¤l¥Ø¿ý ¨º¶]»¼°j®É¡A¨C¦¸¤´µM·|¶]¬Û¦Pªºpath µM«á´N¤@ª½¶i¤J»¼°j¦A¦^¨ìì¨Óªºpath¡A¤@ª½°¥´Àð¶]¤£§¹ ¤£¬OÀ³¸Ó¦b©I¥s®É³]µ¹¥¦¶Ü FileArray = GetFiles("/up/file/111/5",0) functionùØ¥un®»±a¶i¨Óªº°Ñ¼Æ§Y¥i
¥»½g¤å³¹¦^ÂЩó2015-04-24 10:06
== ñ¦WÀÉ ==
--¥¼µn¤Jªº·|ûµLªk¬d¬Ý¹ï¤èñ¦WÀÉ-- |
2¼Ó
§@ªÌ¦^À³
jimmy413 ![]() |
·PÁ ¦Ñ¹xµ£¤j §Ú¦b³o¸Ì°¥´Àð¤F¤@¬q®É¶¡ ¦]¬°¤½¥q¶·n ¥H«e¤S¨S¾Ç¹L ·PÁÂ!
¥»½g¤å³¹¦^ÂЩó2015-04-27 13:51
== ñ¦WÀÉ ==
--¥¼µn¤Jªº·|ûµLªk¬d¬Ý¹ï¤èñ¦WÀÉ-- |
¦^ÂÐ |
¦pn¦^À³,½Ð¥ýµn¤J. |