|
-
Oct 2nd, 2003, 07:09 PM
#1
Thread Starter
New Member
I have problem with GetFile
Hi all
I have big problem.
I install windows2000 Pro and add IIS.
If ran asp scripts without write the following statement
set objFile = objFSO.GetFile(Server.Mappath(inFileName))
is runing ok.
If i using
set objFile = objFSO.GetFile(Server.Mappath(inFileName))
I have white page and my processor is busy
Plase help me
-
Oct 3rd, 2003, 09:02 AM
#2
Fanatic Member
Whats the rest of your code.
Is it looping somewhere?
-
Oct 3rd, 2003, 04:25 PM
#3
Thread Starter
New Member
this my code
Dim fso, f, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(Server.MapPath("alhawi.txt"))
s = f.Path & "<br>"
s = s & "Created: " & f.DateCreated & "<br>"
s = s & "Last Accessed: " & f.DateLastAccessed & "<br>"
s = s & "Last Modified: " & f.DateLastModified
ShowFileAccessInfo = s
without any loop
-
Oct 3rd, 2003, 04:46 PM
#4
How is this ASP.NET? That is plain old asp. ASP.NET would look more like this:
VB Code:
Public Function ShowFileAccessInfo(ByVal filename As String) As String
Dim fpath As String = Server.MapPath(filename)
Dim f As New IO.FileInfo(fpath)
Dim s As String
s = fPath & "<br>"
s &= "Created: " & f.CreationTime & "<br>"
s &= "Last Accessed: " & f.LastAccessTime & "<br>"
s &= "Last Modified: " & f.LastWriteTime
Return s
End Function
'syntax
ShowFileAccessInfo("alhawi.txt")
Although really this should be fillinf a label or something of that nature.
Last edited by Edneeis; Oct 3rd, 2003 at 04:50 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|