Attributes ຄຸນສົມບັດ ASP

ການກໍານົດແລະການນໍາໃຊ້

Attributes ຄຸນສົມບັດສາມາດນຳໃຊ້ເພື່ອການຕັ້ງຕັດຫຼືການການຄົ້ນຫາຄຸນສົມບັດບັນທຶກຫຼືສະຖານະການ

ຂອດອກການນຳໃຊ້:

FileObject.Attributes[=newattributes] 
FolderObject.Attributes[=newattributes]
ສະເພາະ ອະທິບາຍ
newattributes

ຄວາມອາດເບິ່ງ. ກຳນົດຄຸນສົມບັດບັນທຶກຫຼືສະຖານະການ

ກໍ່ໄດ້ໃຊ້ຄູ່ມັນຄືກັນຫຼືການປະສົມຄູ່ມັນຂອງຄືກັນ

  • 0 = ບັນທຶກປົກກະຕິ
  • 1 = ບັນທຶກຄົນດໍາເນີນພຽງ
  • 2 = ບັນທຶກລັບ
  • 4 = ບັນທຶກລະບົບ
  • 16 = ສະຖານະການເອກະສານຫຼັກ
  • 32 = ຕັ້ງແຕ່ຄັ້ງການກະຕຸ້ມບັນທຶກຄັ້ງກ່ອນ, ບັນທຶກໄດ້ປ່ຽນແປງ
  • 1024 = ການເຊື່ອມຕໍ່ຫຼືຫົວຫຼັກ
  • 2048 = ການກະຕຸ້ມບັນທຶກ

ບົດສະຫຼຸບ

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
ການຂຽນຄຳສັ່ງ: "The attributes of the file are: "
Response.Write("}}")f.Attributes)
set f=nothing
set fs=nothing
%>

Output:

The attributes of the file are: 32