Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÀûÓÃGlobal.ASP¶¨Ê±Ö´ÐÐASP

Using the global.asa to schedule ASP code execution.
Have you ever had some asp code that needed to execute every once in a while but, you just didn't know how to do it.
There is a solution that doesn't involve running any scheduling or scripting software on the server and is actually very easy to get working.
You see...¡¡there is thing called the "global.asa". Most ASP newbies probably wonder what the heck it even is. The Global.asa file is event driven. It can contain four event procedures: Application_OnStart, Application_OnEnd, Session_OnStart, and Session_OnEnd.
The global.asa is basically loaded into memory the first time any user views a page on your Web application. There are event procedure stubs that can contain script you want to be executed when the application starts or ends, or when the session starts or ends.
With some tricky coding you can use this file to schedule code to execute. At least around the time you need it to, this won't be able to make it execute at exactly a certain time.
Here is the 1st example. It simply keeps track of how many visitors


Ïà¹ØÎĵµ£º

ÓÃASPËæ»ú²úÉúËæ»úÊý

<%
Function gen_key(digits)
'Create and define array
dim char_array(50)
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
char_array( ......

ASP²ÉÓÃODBCÊý¾ÝÔ´Á¬½ÓMSSQLÊý¾Ý¿âÏêϸ˵Ã÷¡¾ÊµÓá¿

ODBCÊý¾ÝÔ´¿É·ÖΪ“ϵͳÐÍ”ºÍ“ÎļþÐÍ”£¬ËûÃǵÄÇø±ðÔÚÓړϵͳÐÍ”ÊÇÁ¬½ÓÊý¾Ý¿âµÄÐÅÏ¢½¨Á¢Ôړϵͳע²á±í”À“ÎļþÐÍ”ÔòÊÇÒÔdsnÎļþÐÎʽ´æ´¢ÔÚODBCÔ´µÄĿ¼ÏÂÃæ
Ò»¡¢½¨Á¢ODBCÊý¾ÝÔ´µÄ·½·¨£º
¿ØÖÆÃæ°å - ¹ÜÀí¹¤¾ß - Êý¾ÝÔ´£¨ODBC£©
´ò¿ªODBCÊý¾ÝÔ´¹ÜÀíÆ÷£¬È»ºóÒ ......

¼èÄѵľñÔñ£ºPHPÓëASPµÄ×ۺϱȽÏ

ʲôÊÇPHP
¡¡¡¡PHP´ú±íÁË"³¬Îı¾´¦ÀíÆ÷"£¬ÕâÒâζ×ÅÄã±ØÐëÖªµÀ£¬ËüÊÇÒ»ÖÖ·þÎñÆ÷¶ËµÄ´¦ÀíÓïÑÔ£¬ÇÒÒÔHTMLµÄÐÎʽ³öÏÖ¡£Ëü×î³£Óõĵط½¾ÍÊÇÍøÒ³ÁË£¬Êý¾Ý´Ó¿Í»§»ú·¢Ë͵½Web·þÎñÆ÷£¬ÐÅÏ¢Ôڴ˱»´¦Àí²¢·µ»Ø½á¹û¡£
¡¡¡¡µ«ÕâÖÖͨÓÃÐÔµÄÓïÑÔË¿ºÁ²»¾ÖÏÞÓÚÔÚÍøÒ³·½Ã棬PHPÒ²Äܱ»ÓÃÔÚÃüÁîÐÐshellÖУ¬Ëü¿É×÷Ϊ²Ù×÷ϵͳµÄÒ»¸öÀ©Õ¹£¬ÓÉ´ËÖ´Ð ......

ASP MapPath ·½·¨

http://www.w3school.com.cn/asp/met_mappath.asp
¶¨ÒåºÍÓ÷¨
MapPath ·½·¨¿É°ÑÖ¸¶¨µÄ·¾¶Ó°Éäµ½·þÎñÆ÷ÉÏÏàÓ¦µÄÎïÀí·¾¶ÉÏ¡£
×¢ÊÍ£º´Ë·½·¨²»ÄÜÓÃÓÚ Session.OnEnd ºÍ Application.OnEnd ÖС£
ʵÀý
ʵÀý 1
¾ÙÀý£¬Îļþ test.asp λÓÚ C:\Inetpub\wwwroot\Script¡£
Îļþ Test.asp (λÓÚ C:\Inetpub\wwwroot\Script) °üº ......

UTF8Êý¾Ýת»»³ÉΪGB2312£¨AspÖУ©

½ñÌìÓöµ½Ò»¸öasp³ÌÐò£¬ÓÃReWriteÖØдURLºó£¬ÖÐÎIJÎÊýÂÒÂ룬²é×ÊÁϺó˵ÊÇReWriteËù½ÓÊյIJÎÊý×Ô¶¯×ªÎªUTF-8£¬¶øÎÒµÄǰ̨ҳÃæºÍÊý¾Ý¿â¶¼ÎªGB2312¸ñʽ£¬ºóÀ´ÔÚÍøÉÏÕÒÁ˺þã¬ÖÕÓÚÕÒµ½Ò»¸öÄܳɹ¦½«UTF-8ת»»ÎªGB2312µÄº¯Êý£¬º¯Êýת»»´úÂëÈçÏÂ
<%
function CodeConvert(fileContent)
dim stm
set stm=Server.Crea ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ