ປະສົມເພື່ອຊະນິດ ASP

ການອະທິບາຍແລະການນໍາໃຊ້

ປະສົມເພື່ອການກັບຄືນຊະນິດຂອງສາຍຫຼືອຸປະກອນຫ້ອງວັດສະດຸ.

ວິທີການ:

FileObject.Type
FolderObject.Type

ຄວາມລະອຽດສຳຫຼັບອຸປະກອນ File

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:help.txt")
Response.Write("The file test.txt is of type: ")
Response.Write(f.Type)
set f=nothing
set fs=nothing
%>

ການສົ່ງອອກ:

The file help.txt is of type: Text Document

ຄວາມລະອຽດສຳຫຼັບອຸປະກອນ Folder

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:help.asp")
Response.Write("ສາຍເພື່ອຫຼັກສັດ test.asp ແມ່ນຊະນິດ: ")
Response.Write(f.Type)
set f=nothing
set fs=nothing
%>

ການສົ່ງອອກ:

ແບບພາບຂອງເອກໂອບ help.asp ແມ່ນ: Active Server Document