<p>fso检测文件存在FileExists或文件夹是否存在FolderExists,<br /> &#39;==============================<br /> &#39;函 数 名:IsFile<br /> &#39;作 用:检测文件是否存在<br /> &#39;参 数:文件相对路径FilePath<br /> &#39;==============================<br /> Function IsFile(FilePath)<br /> Set Fso=Server.CreateObject(&quot;Scri&quot;&amp;&quot;pting.File&quot;&amp;&quot;Sys&quot;&amp;&quot;temObject&quot;)<br /> If (Fso.FileExists(Server.MapPath(FilePath))) Then<br /> IsFile=True<br /> Else<br /> IsFile=False<br /> End If<br /> Set Fso=Nothing<br /> End Function<br /> <br /> &#39;==============================<br /> &#39;函 数 名:IsFolder<br /> &#39;作 用:检测文件夹是否存在<br /> &#39;参 数:文件相对路径FolderPath<br /> &#39;==============================<br /> Function IsFolder(FolderPath)<br /> Set Fso=Server.CreateObject(&quot;Scri&quot;&amp;&quot;pting.File&quot;&amp;&quot;Sys&quot;&amp;&quot;temObject&quot;)<br /> If Fso.FolderExists(Server.MapPath(FolderPath)) Then <br /> IsFolder=True<br /> Else<br /> IsFolder=False<br /> End If<br /> Set Fso=Nothing<br /> End Function</p>
T:0.006349s,M:245.32 KB
返回顶部 留言