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.

59 lines
1.6 KiB

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <meta name="GENERATOR" content="ActiveState_Hack = Dick Hardt">
  5. <!--
  6. Copyright (c) 1996, Microsoft Corporation. All rights reserved.
  7. Developed by ActiveState Internet Corp., http://www.ActiveState.com
  8. -->
  9. <title>VBScript calling PerlScript - Hello, world!</title>
  10. </head>
  11. <body>
  12. <BODY BGCOLOR=#FFFFFF>
  13. <!--
  14. ActiveState PerlScript sample
  15. PerlScript: The coolest way to program custom web solutions.
  16. -->
  17. <!-- Masthead -->
  18. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  19. <TR VALIGN=TOP ><TD WIDTH=400>
  20. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
  21. </TD></TR></TABLE>
  22. <h2> VBScript calling PerlScript for string manipulation
  23. <hr>
  24. <script language=PerlScript RUNAT=Server>
  25. sub foobar {
  26. return reverse $_[0];
  27. }
  28. </script>
  29. <blockquote>
  30. <%
  31. 'VBScript is default script engine
  32. response.write "VBScript says: Hello, World!<P>"
  33. response.write foobar(">P<!dlroW ,olleH :syas tpircSlreP")
  34. %>
  35. </blockquote>
  36. </h2>
  37. <!-- +++++++++++++++++++++++++++++++++++++
  38. here is the standard showsource link - in VBScript--> <hr>
  39. <SCRIPT LANGUAGE="PerlScript" RUNAT="Server">
  40. sub GetParams
  41. {
  42. $url = $Request->ServerVariables('PATH_INFO')->item;
  43. $params = 'filename=vbs-pl-param.asp&URL='."$url";
  44. $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  45. $Response->write($params);
  46. }
  47. </SCRIPT>
  48. <A HREF="index.htm"> Return </A>
  49. <A HREF="showsource.asp?<% GetParams %>">
  50. <h4><i>view the source</i></h4></A>
  51. </body>
  52. </html>