php ³ÌÐòÔËÐÐʱ¼ä ¼ÆËã
/**
* »ñµÃµ±Ç°Ê±¼äµÄºÁÃëÊý£¬Óû§¼ì²âÒ³ÃæµÄÖ´ÐÐʱ¼ä
*
* @author cjz
* @date Thu Apr 09 15:05:55 CST 2009
*
* @return float(ºÁÃëÊý)
*/
function myGetMicrotime()
{
list($usec,$sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
Ïà¹ØÎĵµ£º
½ñÌìÓöµ½ÁËÒ»¸ö¹ÖÎÊÌ⣬ÎÒÓÃ$fp=fopen("access_log.txt","ab")´ò¿ªÒ»¸öÎļþºó¿ªÊ¼ÍùÀïÃæдÊý¾Ý£¬Ð´µÄÄÚÈÝÊÇ 'XXX\nXXX\n'£»
µ«ÊÇÆæ¹ÖµÄÊÇ ²»¹ÜÎÒÔõôÍùÀïÃæд ËûÊDz»»»ÐÐ,¼Çʱ¾Àï¼Ç¼µÄÊý¾Ý ¾ÍÊÇ 'xxx\nxxx\n'£¬
ºÜÊÇÄÕ»ð£¬È¥ÍøÉÏËѼ¯×ÊÁÏ£¬ÓеÄ˵¸Ä³É'\r\n'ʲôµÄ£¬½á¹ûÊÇд½øÈ¥ºó»¹ÊÇ 'xxx\r\nxx ......
ÄãÊÇPHP²ËÄñ£¬Èç¹ûÄ㣺
1. ²»»áÀûÓÃÈçphpDoc
ÕâÑùµÄ¹¤¾ßÀ´Ç¡µ±µØ×¢ÊÍÄãµÄ´úÂë
2. ¶ÔÓÅÐãµÄ¼¯³É¿ª·¢»·¾³ÈçZend Studio
»òEclipse PDT
ÊÓ¶ø²»¼û
3. ´ÓδÓùýÈκÎÐÎʽµÄ°æ±¾¿ØÖÆϵͳ£¬ÈçSubclipse
4. ²»²ÉÓÃijÖÖ±àÂëÓëÃüÃû±ê×¼
£¬ÒÔ¼°Í¨ÓÃÔ¼¶¨£¬²»ÄÜÔÚÏîÄ¿¿ª·¢ÖÜÆÚÀï¹á³¹Âäʵ
5. ²»Ê¹ÓÃͳһ¿ª·¢·½Ê½
6. ²»×ª ......
ÔÚphpÖз¢ËÍÓʼþ¿ÉÒÔÓÃ×Ô´øµÄmail()º¯Êý£¬µ«ÊÇÕâ¸öº¯Êý²»×ãµãºÜÃ÷ÏÔ£¬×îÖ÷ÒªÊÇÔÛ±¾»úÉÏûÓа²×°smtp·þÎñ¾Íû·¨Ê¹ÓÃmail()¡£
µ±È»ÏÖÔÚ»¹ÓÐphpÆäËûµÄ²å¼þ¡¢ÀàʲôµÄ£¬ÄÇЩҲÐí¹¦ÄÜÆëÈ«£¬¿ÉÊÇÍâ¼Ó¾Í¸Ð¾õ²»Ë¬¡£
ÄÇÆäËû°ì·¨µÄ»°£¬Ò»°ã»áÏ뵽ͨ¹ýSMTP·þÎñÆ÷À´·¢ËÍÓʼþ£¬µ«ÊÇÒ²»á²úÉúһϵÁÐÎÊÌ⣨¾ßÌåÓÐÄÄЩÎÊÌâ¿É¼û²Î¿¼×ÊÁÏ"ÎÞÐ ......
1¡¢¹ýÂ˱êÇ©(HTML)£ºstrip_tags()
ÀýÈ磺
<?php
$text = '<?php ?><p>Test paragraph.</p><!-- Comment -
-> <a href=http://topic.csdn.net/u/20090311/09/"#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// ÔÊÐíʹÓÃ<p>ºÍ<a>
echo stri ......
define("DB_SERVER","127.0.0.1");
define("DB_PORT",3306);
define("DB_CATALOG","uab");
define("DB_USERID","root");
define("DB_PASSWORD","");
$dsn="mysql:host=".DB_SERVER.";port=".DB_PORT.";dbname=".DB_CATALOG;
self::$__PDO=new PDO($dsn, DB_USERID, DB_PASSWORD);
//support long connection
self:: ......