asunpraise
MIS
Anybody has any idea why even the code I got from ASP book is not working? Problem is always the same: page gets stuck.
Is it because XP has issue with Norton AntiVirus software?
I can't uninstall Norton from my computer though, any ideas?
Code for creating a file:
********************************************************
dim filesys, filetxt, getname, path
Set filesys = CreateObject("Scripting.FileSystemObject"
Set filetxt = filesys.CreateTextFile("c:\somefile.txt", True)
path = filesys.GetAbsoultePathName("c:\somefile.txt"
getname = filesys.GetFileName(path)
filetxt.WriteLine("Your text goes here."
filetxt.Close
if filesys.FileExists(path) Then
Response.Write ("Your file, " & getname & ", has been created."
End if
**************************************************
Here is the code for viewing a file:
<%
' File System Object
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject"
' "Uploaded" Folder
Dim folder, idpath
idpath = Session("id"
'Set folder = fso.GetFolder(Server.MapPath("idpath/")
If folder.Size > 0 Then
Response.Write "<ul>" & idpath
'For Each file In folder.Files
' Response.Write "<li type=""circle"">"
' Response.Write "<a href=""idpath/" & file.Name & """>"
' Response.Write "<b>" & file.Name & "</b></a>"
' Response.Write "( Size: " & file.Size & " )"
'Next
Response.Write "</ul>"
Else
Response.Write "<ul><li type=""circle"">No Files Uploaded.</ul>"
End If
%>
Thanks guys!
Is it because XP has issue with Norton AntiVirus software?
I can't uninstall Norton from my computer though, any ideas?
Code for creating a file:
********************************************************
dim filesys, filetxt, getname, path
Set filesys = CreateObject("Scripting.FileSystemObject"
Set filetxt = filesys.CreateTextFile("c:\somefile.txt", True)
path = filesys.GetAbsoultePathName("c:\somefile.txt"
getname = filesys.GetFileName(path)
filetxt.WriteLine("Your text goes here."
filetxt.Close
if filesys.FileExists(path) Then
Response.Write ("Your file, " & getname & ", has been created."
End if
**************************************************
Here is the code for viewing a file:
<%
' File System Object
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject"
' "Uploaded" Folder
Dim folder, idpath
idpath = Session("id"
'Set folder = fso.GetFolder(Server.MapPath("idpath/")
If folder.Size > 0 Then
Response.Write "<ul>" & idpath
'For Each file In folder.Files
' Response.Write "<li type=""circle"">"
' Response.Write "<a href=""idpath/" & file.Name & """>"
' Response.Write "<b>" & file.Name & "</b></a>"
' Response.Write "( Size: " & file.Size & " )"
'Next
Response.Write "</ul>"
Else
Response.Write "<ul><li type=""circle"">No Files Uploaded.</ul>"
End If
%>
Thanks guys!