Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
1.8 KiB

<%@ LANGUAGE = PerlScript%>
<HTML>
<HEAD>
<!--
Copyright (c) 1996, Microsoft Corporation. All rights reserved.
Developed by ActiveState Internet Corp., http://www.ActiveState.com
-->
<TITLE>Active Server Pages - Perl Version</title>
</HEAD>
<BODY>
<BODY BGCOLOR=#FFFFFF>
<!--
ActiveState PerlScript sample
PerlScript: The coolest way to program custom web solutions.
-->
<!-- Masthead -->
<TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
<TR VALIGN=TOP ><TD WIDTH=400>
<A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
</TD></TR></TABLE>
<HR>
<H3>Active Server Session Object</H3>
<br>
This examples uses the ASP Session object. It retrieves a session variable,
increments its value, and saves it each time the webpage is reloaded.
<BR>
<BR>
<B>
<%
# get the value associated with 'MyVar'
# increment the value then store it back
$var = $Session->{'MyVar'};
$var++;
$Session->{'MyVar'} = $var;
# let the user know what the value of the variable is
$Response->write("The value of the session variable MyVar is $var after being incremented");
%>
</B>
<br>
<br>
<a href="session2.asp">Click here to see another page access the session variable MyVar.</a>
<!-- +++++++++++++++++++++++++++++++++++++
here is the standard showsource link -
Note that PerlScript must be the default language --> <hr>
<%
$url = $Request->ServerVariables('PATH_INFO')->item;
$_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
s/[\/\\](\w*\.asp\Z)//m;
$params = 'filename='."$1".'&URL='."$url";
$params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
%>
<A HREF="index.htm"> Return </A>
<A HREF="showsource.asp?<%=$params%>">
<h4><i>view the source</i></h4></A>
</BODY>
</HTML>