Latest web development tutorials

วิธี GetExtensionName ASP

อ้างอิงวัตถุ FileSystemObject อ้างอิงวัตถุ FileSystemObject สมบูรณ์

วิธี GetExtensionName กลับสตริงที่มีเส้นทางที่ระบุในไฟล์นามสกุลองค์ประกอบสุดท้าย

ไวยากรณ์

FileSystemObject.GetExtensionName(path)

参数 描述
path 必需的。需返回文件扩展名的文件的路径。

ตัวอย่าง

<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetExtensionName("c:\test\test.htm"))
set fs=nothing
%>

输出:

htm


อ้างอิงวัตถุ FileSystemObject อ้างอิงวัตถุ FileSystemObject สมบูรณ์