Using GetNumberOfLinesInFile()


Number of lines in "comments.txt": -22
Number of lines in "poem.txt": 36
Number of lines in "idea.txt": 12
Number of lines in "default.asp": 29

Contents of default.asp :
<!-- The includefile is one level back from the "default.asp" file: -->
<!--#include file ="../../jakes_IO.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="da">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Example use of the GetNumberOfLinesInFile function</title>
    <link rel="stylesheet" type="text/css" href="/jake.css">
</head>
<body>
    <div align="center"><h1>Using GetNumberOfLinesInFile()</h1></div>
    <br>
    
    <span class="sample">
    <!-- ***************    HERE IS WHERE IT HAPPENS!!     ****************** -->
    Number of lines in <a href="comments.txt">"comments.txt"</a>: -<%=GetNumberOfLinesInFile("comments.txt")%>
    <br>Number of lines in <a href="poem.txt">"poem.txt"</a>: <%=GetNumberOfLinesInFile("poem.txt")%>
    <br>Number of lines in <a href="idea.txt">"idea.txt"</a>: <%=GetNumberOfLinesInFile("idea.txt")%>
    <br>Number of lines in <a href="default.asp">"default.asp"</a>: <%=GetNumberOfLinesInFile("default.asp")%>
    <!-- ********************************************************************** -->
    </span>
    
    <p><b>Contents of default.asp :</b><br>
    <span class="source">
    <% response.write(stringToHTML (GetFileContents("default.asp")))%>
    </span>

</body>
</html>