JSP/PHPÔËÓÃÏê½â
1£¬DateTimeÀàÐÍÊý×Ö
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
µ±Ç°Ê±¼äSystem.DateTimeµÄ=ÐÂSystem.DateTimeµÄ£¨£©;
1.1Сʱ·ÖÖÓµ±Ç°ÈÕÆÚÃ룬µ±Ç°Ê±¼ä= System.DateTime.Now;
1.2¼ì²é±¾Äê¶ÈÁ®ÕþÄê= currentTime.Year;
1.3µ±Ç°Ô·ÝÁ®Õþ¸öÔÂ= currentTime.Month;
1,4²ÉÈ¡µ±ÌìÁ®ÕþÌì= currentTime.Day;
1.5»ñÈ¡µ±Ç°Ê±¼äÁ®Õþʱ¼ä= currentTime.Hour;
1.6¼ì²éµ±Ç°µÄ·ÖÔ´Ç鱨վ= currentTime.Minute;
ÒÔÄ¿Ç°µÄ1.7ÃëÁ®ÕþÃë= currentTime.Second;
ÒÔÄ¿Ç°1.8ºÁÃëÁ®ÕþºÁÃë= currentTime.Millisecond;
£¨±äÁ¿¿ÉÓÃÖÐÎÄ£©
2£¬Int32.Parse£¨±äÁ¿£©£¬Int32.Parse£¨“³£Á¿”£©
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
ת»»Îª32λ×Ö·û×ÖÌå
3¸ö±äÁ¿¡£µÄtoString£¨£©
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
·ûºÅת»»ÎªÒ»¸ö×Ö·û´®
12345.ToString£¨“n”ÐÍ£©; / /Éú³É12,345.00
12345.ToString£¨“C”Àࣩ; / /Éú³É£¤12,345.00
12345.ToString£¨“µç×Ó”£©; / /Éú³É1.234500e 004
12345.ToString£¨“F4”Àࣩ; / /Éú³É12,345.0000
12345.ToString£¨“×”£©; / /Éú³É3039£¨16½øÖÆ£©
12345.ToString£¨“p”±íʾ£©; / /Éú³É1,234,500.00£¥
4£¬±äÁ¿¡£³¤¶ÈÊýÖµ
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
»ñÈ¡×Ö·û´®³¤¶È£º
È磺×Ö·û´®str =“Öйú”;
Á®Õþ³¤¶È= str.length; / / lenÊÇÒ»¸ö×Ô¶¨Òå±äÁ¿strÊÇʵÏֿɺâÁ¿µÄ±äÁ¿Ãû³Æ×Ö·û´®
5£¬System.Text.Encoding.Default.GetBytes£¨±äÁ¿£©
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
λÂë×ÖÂ뿪¹Ø
ÀýÈ磺×Ö½Ú[] bytStr = System.Text.Encoding.Default.GetBytes£¨º£Ï¿£©;
Æä´ÎÊÇ볤£º
³¤¶È= bytStr.Length;
6£¬System.Text.StringBuilder£¨“”£©
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
×Ö·û´®Ìí¼Ó£¨+Êý×ÖÊDz»Ò»ÑùµÄÊ£¿£©
ÓÉÓÚSystem.Text.StringBuilderijÈË=ÐÂSystem.Text.StringBuilder ("");
sb.Append£¨“ÖлªÈËÃñ¹²ºÍ¹ú”£©;
sb.Append£¨“¹«¹²”£©;
sb.Append£¨“¹²ºÍ¹ú”£©;
7£¬±äÁ¿¡£´®£¨²ÎÊý1£¬²ÎÊý2£©;
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
À¹½ØµÄ×óÔÀ´µÄ²ÎÊý×Ö·û´®µÄÒ»²¿·ÖÓÒÒíµÄÊý×Ö£¬ÉÙÊýÀ¹½Ø²ÎÊý2¡£
ÀýÈç£
Ïà¹ØÎĵµ£º
¼Æ»®ÈÎÎñ£¨Schedule Task£©ÊÇwindowsƽ̨ÉϺÍcronÀàËƵÄÒ»¸ö³ÌÐò£¬µ±È»¹¦ÄÜÉϲîÁ˺ܶàÁË¡£
ÒòΪÐèҪÿ¸öСʱÔËÐÐÒ»¸öPHP³ÌÐò£¬ÊÖ¶¯²Ù×÷²»ÏÖʵÁË¡£
Ê×ÏÈÔÚcmdϲâÊÔ£¬ÀýÈ磺 c:\appserv\php5\php.exe "C:\AppServ\www\temp2.php"
ÓÐÒ»µãҪעÒâ¾ÍÊÇÈç¹ûÄǸöPHPÒýÓÃÁËÆäËûÒ³Ã棬ÐèÒªÌṩ¾ø¶Ô·¾¶ÁË£¬ÖÁÉÙÎҵIJâÊÔ ......
±¾ÆªÎÄÕÂÀ´Ô´ÓÚ ºÚ¿Í»ùµØ-È«Çò×î´óµÄÖÐÎĺڿÍÕ¾ ÔÎÄÁ´½Ó£ºhttp://hackbase.com/tech/2009-08-04/54550_1.html
2007Äê11ÔÂ01ÈÕ ÐÇÆÚËÄ ÏÂÎç 03:48ÈÃÎÒÃÇÒÔÒ»¸ö¼òµ¥µÄÀý×Ó¿ªÊ¼---Ò»¸ö½ÓÊÕÊäÈë×Ö·û´®,´¦Àí²¢·µ»ØÕâ¸ö×Ö·û´®µ½¿Í»§¶ËµÄTCP·þÎñ.ÏÂÃæÊÇÏàÓ¦µÄ´úÂë:PHP ´úÂë: ------------------------------------------------ ......
ʹÓÃPHPµÄcURL¿â¿ÉÒÔ¼òµ¥ºÍÓÐЧµØÈ¥×¥ÍøÒ³¡£ÄãÖ»ÐèÒªÔËÐÐÒ»¸ö½Å±¾£¬È»ºó·ÖÎöÒ»ÏÂÄãËùץȡµÄÍøÒ³£¬È»ºó¾Í¿ÉÒÔÒÔ³ÌÐòµÄ·½Ê½µÃµ½ÄãÏëÒªµÄÊý¾Ý
ÁË¡£ÎÞÂÛÊÇÄãÏë´Ó´ÓÒ»¸öÁ´½ÓÉÏÈ¡²¿·ÖÊý¾Ý£¬»òÊÇÈ¡Ò»¸öXMLÎļþ²¢°ÑÆäµ¼ÈëÊý¾Ý¿â£¬ÄÇžÍÊǼòµ¥µÄ»ñÈ¡ÍøÒ³ÄÚÈÝ£¬cURL ÊÇÒ»¸ö¹¦ÄÜÇ¿´óµÄPHP¿â¡£
PHPÖеÄCURLº¯Êý¿â£¨Client URL Librar ......
¹úÍâµÄ¿ªÔ´¼¼ÊõÒ²Ó°ÏìºÍÍƶ¯Á˹úÄÚ¿ªÔ´³ÌÐòµÄ·¢Õ¹,¹úÍâÓÅÐ㿪ԴPHP½¨Õ¾³ÌÐòÒ»ÀÀÖÐ,ºÜ¶à¹úÍ⿪Դ³ÌÐò²¢²»Ì«·ûºÏÖйúÈ˵ÄʹÓÃÏ°¹ß,¶ø¹úÄÚÓÐһЩ³§¼Ò»ò¸öÈËÒ²×öÁËһЩ²»´íµÄ²úÆ·,²»ÉÙ³ÌÐòÊÇÌṩԴ´úÂëÏÂÔصÄ,ËäÈ»ÓÐЩÔÚÐí¿ÉÐÒéÉϺͿªÔ´Ðí¿ÉÖ¤ÓÐЩ³öÈë,µ«ÆäÔÚʹÓÃÉÏ»¹ÊÇͦ·ûºÏÖйúÈ˵ÄʹÓÃÏ°¹ß,½ñÌìÎҾͽéÉÜһЩ¹úÄÚµÄPHP&rdqu ......
PHPÄ£ÄâSMTP·¢ËÍÓʼþµÄÀà
<?php
/*********************************************************
filename£ºmail.class.php
describe£ºÓÊÏäµÄÅäÖ㬾²âÊÔ¿ÉÒÔÊÊÓÃÓÚLinuxºÍwindows
function£º¼ì²éÓÊÏäµÄºÏ·¨ÐÔ£¬·¢ËÍ»ù±¾µÄÓÊÏäÑéÖ¤ÐÅÏ¢
author£º etongchina@gmail. ......