PHPÉú³ÉwordÎĵµ
ÕâÀïÖ»ÊÇÒ»¸öÀý×Ó£¬ÓÃPHPÉú³ÉÊý¾Ý×ÖµäµÄÀý×Ó£¬ÊʺÏÀÁÈË
<?php
/*
+----------------------------------------------------------------------+
| base: Yang Yu <yangyu@sina.cn> create@2009-5-18 |
| Author: jiafeng create@2010-01-27 |
+----------------------------------------------------------------------+
*/
$db_server = "localhost";
$db_name = "test_r";
$db_user = "root";
$db_pwd = "root";
$tilte = "Êý¾Ý×Öµä";
$link = mysql_connect($db_server, $db_user, $db_pwd) or die("no server");
mysql_select_db($db_name, $link) or die("no db");
//$sql = "set names gbk";
//mysql_query($sql);
$html = '
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 11">
<title>'.$tilte.'</title>
<img src="http://i1.sinaimg.cn/home/deco/2009/0330/logo_home.gif">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Print</w:View>
<w:Zoom>115</w:Zoom>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
&nbs
Ïà¹ØÎĵµ£º
<?php
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
//Àý×Ó
//¿ªÊ¼
$time_start = getmicrotime();
//ÕâÀï·ÅÄãµÄ´úÂë
......
ʹÓûº´æ¼¼ÊõµÄÀíÓÉ£¿µ±È»ÊÇÌá¸ßÍøÕ¾µÄ·ÃÎÊËٶȣ¡
Ìýµ½php»º´æ¼¼ÊõÊÇʲôʱºò£¿²»¼ÇµÃÁË£¬ºÇºÇ£¬¹¤×÷µ±ÖÐһֱûעÒâÕâ¸ö¡£ÄÕ»ð~~
½ñÌì·è¿ñGoogleÁËһϣ¬»ò¶à»òÉÙÁ˽âÁËһЩ¶«Î÷£¬ÄǾͼòµ¥µÄ¹éÄÉһϰɣ¬¸÷λ¿´¹Ù±ðÈÓשͷ£¡
»º´æ¼¼Êõ·ÖΪ¶¯Ì¬»º´æ¼¼ÊõºÍ¾²Ì¬»º´æ¼¼Êõ£¬¶ÔÓÚÄÇЩPV²»ÊǺܴóµÄÖÐСÐÍÍøվʹÓö¯Ì¬»º´æ¼¼Êõ¹À¼ ......
date() ½«·þÎñÆ÷µÄʱ¼ä¸ñʽ»¯
Óï·¨ÃèÊöΪstring date(string format,int[timestamp]);·µ»ØÖµµÄÊý¾ÝÀàÐÍÊÇ×Ö·û´®¡£
º¯Êý˵Ã÷£º·µ»ØÖµµÄ×Ö·û´®°´ÅäÖõĸñʽ¾ö¶¨¡£
×Ö·û´®¸ñʽ»¯µÄÑ¡ÏîÈçÏ£º
a: "am"»òÊÇ"pm"
A: "AM"»òÊÇ"PM"
d: ¼¸ÈÕ£¬Á½Î»Êý×Ö£¬Èô²»×ãÔò²¹Á㣻´Ó"01"ÖÁ"31"
D: ÐÇÆÚ¼¸£¬3¸öÓ¢ÎÄ×Öĸ£¬Èç:"Fri"
......
header("Expires: Mon, 26 Jul 2007 05:00:00 GMT"); »º´æʧЧʱ¼ä
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); ×îºóÐÞ¸ÄÍøÒ³µÄʱ¼ä
header("Cache-Control: no-cache, must-revalidate"); ½ûÓûº´æ
header("Pragma: n ......
(1)mysql_connect(Ö÷»ú,Óû§Ãû,¿ÚÁî);
·µ»ØÒ»¸öÁ¬½ÓºÅ.
×¢Òâ:mysql¸÷Óû§µÄ¿ÚÁî¿ÉÒÔËæ¸ÃÓû§ËùÔÚ»úÆ÷IPµØÖ·²»Í¬¶ø¸Ä±ä. ÁíÍâ,mSQLûÓÐÓû§Ãû»úÖÆ,ËùÒÔmsql_connectÖ»ÐèÒªÒ»¸öÖ÷»ú²ÎÊý.Ö÷»ú¿ÉÒÔÊÇIPµØÖ·»òÓòÃû.
(2)mysql_create_db(Êý¾Ý¿âÃû);
(3)mysql_select_db(Êý¾Ý¿âÃû,Á¬½ÓºÅ);
Á¬½ÓÒ»¸öÊý¾Ý¿â.
(4)mysql_q ......