home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / asp / application.asp < prev    next >
Encoding:
Text File  |  2003-09-03  |  737 b   |  26 lines

  1. #!/usr/bin/perl /usr/bin/asp-perl
  2.  
  3. <!--#include file=header.inc-->
  4. <% 
  5.     # Locking
  6.     # --------
  7.     # reads and writes to $Application as well as $Session are
  8.     # always locked to ensure concurrency, but if you want to 
  9.     # make sure that you have the only access during
  10.     # some block of commands, then use the Lock() and UnLock()
  11.     # functions
  12.  
  13.     $Application->Lock();
  14.     $Application->{Count}+=1;
  15.     $Application->UnLock();
  16.  
  17. %>
  18. We just incremented the $Application->{Count} variable by 1.
  19. Here is the value of the $Application->{Count} variable... <br>
  20. <b><%= sprintf("%06d", $Application->{Count}) %></b>
  21. <p>
  22. We reset this value to 20 every Application_OnStart.  Check
  23. out the global.asa!
  24.  
  25. <!--#include file=footer.inc-->
  26.