<% 
	use DemoASP; 
	$demo = &DemoASP::new();

	# send output out immediately 
	# in case we are on non-Win32 platform, 
	# which dies on $Server->CreateObject()
	#
	$Response->{Buffer} = 0; 
				
%>
<html>
<head><title><%=$demo->{title}%></title></head>
<body bgcolor=<%=$demo->{bgcolor}%>>
This script only works if you have Win32, and the Scripting.FileSystemObject
installed on your system, an object which ships with IIS.
<p>
<%
	$file_obj = $Server->CreateObject('Scripting.FileSystemObject');
	print "Creating file system object: $file_obj<br>\n";

	$0 =~ /([^\\\/]*)$/;
	$file_name = $1;
	print "Opening self, file name: $file_name\n";
	$file_stream = $file_obj->OpenTextFile($file_name);
%>
<p>

First 15 lines here...
<P>
<pre>
<% for(1..15) { %> 
	<%=$Server->HTMLEncode($file_stream->ReadLine())%>
<% } %>
</pre>
End lines read.
<p>
<a href="source.asp?file=<%=$Request->ServerVariables("SCRIPT_NAME")%>">
view this file's source
</a>
</body>
</html>


