I'm getting the path of the file
it exists
and after it exists there's something wrong with my code
any idea of what's wrong?
Code:
<%
var filePath = Server.MapPath("/work/email-content.txt")
var fso = Server.CreateObject("Scripting.FileSystemObject")
if(fso.FileExists(filePath))
{
var str = "";
Response.Write("File Opened PLEASE");
file = fso.OpenTextFile(filePath,1,false);
str += Server.HTMLEncode( file.ReadAll() );
file.Close();
Response.Write(str);
//file = Nothing;
//fso = Nothing;
}
else
{
Response.Write("Didn't open the file");
}
%>