1
如何检查文件是否为文本文件或不ASP如何检查文件是否为文本文件或不ASP
如何检查文件是否为文本文件或不ASP如何检查文件是否为文本文件或不ASP
<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetExtensionName("c:\test\test.htm"))
set fs=nothing
%>
Output:
htm
好容易; http://stackoverflow.com/questions/277521/how-to-identify-the-file-content-is-in-ascii-or-binary – 2010-07-05 10:14:43
你想知道上传的文件是否有TXT扩展?如果是这样,你正在使用的上传器是什么?“ – 2010-07-22 10:17:27
<% dim fs set fs = Server.CreateObject(”Scripting.FileSystemObject“) Response.Write(fs.GetExtensionName(”c:\ test \ test.htm “)) set fs = nothing %> 输出: htm – user580950 2011-09-29 04:24:33