??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精彩视频在线观看,亚洲中文字幕久久久一区,亚洲精品白浆高清久久久久久 http://www.tkk7.com/ducklyl/category/34655.html用心׃Q努力工作?lt;br/> zh-cnTue, 23 Mar 2010 20:36:46 GMTTue, 23 Mar 2010 20:36:46 GMT60Php Memcache函数?/title><link>http://www.tkk7.com/ducklyl/archive/2010/03/23/316262.html</link><dc:creator>王生?/dc:creator><author>王生?/author><pubDate>Tue, 23 Mar 2010 03:11:00 GMT</pubDate><guid>http://www.tkk7.com/ducklyl/archive/2010/03/23/316262.html</guid><wfw:comment>http://www.tkk7.com/ducklyl/comments/316262.html</wfw:comment><comments>http://www.tkk7.com/ducklyl/archive/2010/03/23/316262.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ducklyl/comments/commentRss/316262.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ducklyl/services/trackbacks/316262.html</trackback:ping><description><![CDATA[Memcache函数库是在PECL(PHP Extension Community Library)中,<br /> 主要作用是搭建大定w的内存数据的临时存放区域Q?br /> 在分布式的时候作用体现的非常明显Q否则不使用。以下為qր例子,都很單?br /> <br /> <?php<br /> $memcache = new Memcache;<br /> $memcache->connect('localhost', 11211) or die ("Could <br /> not connect");<br /> $version = $memcache->getVersion();<br /> echo "Server's version: ".$version." ";<br /> ?><br /> <br /> <?php <br /> $memcache = new Memcache; $memcache->connect('localhost', 11211) or die ("Could not connect");<br /> print_r($memcache->getStats());<br /> /** * Array * ( * [pid] => 8052 * [uptime] => 9205 * [time] => 1205898428 * [version] => 1.2.5 * [pointer_size] => 32 * [rusage_user] => 0.008000 * [rusage_system] => 0.000000 * [curr_items] => 1 * [total_items] => 17 * [bytes] => 57 * [curr_connections] => 2 * [total_connections] => 15 * [connection_structures] => 3 * [cmd_get] => 9 * [cmd_set] => 23 * [get_hits] => 5 * [get_misses] => 4 * [evictions] => 0 * [bytes_read] => 671 * [bytes_written] => 850 * [limit_maxbytes] => 10485760 * [threads] => 1 * ) */<br /> ?><br /> <br /> <?php<br /> $memcache = new Memcache;<br /> $memcache->connect('localhost', 11211) or die ("Could not connect");<br /> $memcache->set( 'name', 'leo', 0, 30);<br /> if(!$memcache->add( 'name', 'susan', 0, 30)){<br />  echo 'susan is exist';<br /> };<br /> $memcache->replace( 'name', 'lion', 0, 300);<br /> echo $memcache->get( 'name');<br /> $memcache->delete( 'name', 5);<br /> ?><br /> <br /> <?php<br /> function _callback_memcache_failure($host, $port) {<br />  print "memcache '$host:$port' failed";<br /> }<br /> $memcache = new Memcache;<br /> $memcache->addServer('192.168.1.116', 11211);<br /> $memcache->setServerParams('192.168.1.116', 11211, 1, 15, true,'_callback_memcache_failure');<br /> echo $memcache->getServerStatus('192.168.1.116', 11211);<br /> ?><br /> <br /> <br /> <?php<br /> $memcache = new Memcache;<br /> $memcache->connect('localhost', 11211);<br /> $memcache->set('test_item', 8);<br /> $memcache->increment('test_item', 4);<br /> echo $memcache->decrement('test_item', 7);<br /> // 昄 5<br /> ?><br /> <br /> MemcachҎ(gu)說明Q?br /> 01.Memcache::add ?d一个|如果已经存在Q则q回false<br /> 02.Memcache::addServer ?d一个可供用的服务器地址<br /> 03.Memcache::close ?关闭一个Memcache对象<br /> 04.Memcache::connect ?创徏一个Memcache对象<br /> 05.memcache_debug ?控制调试功能<br /> 06.Memcache::decrement ?对保存的某个key中的D行减法操?<br /> 07.Memcache::delete ?删除一个key?br /> 08.Memcache::flush ?清除所有缓存的数据<br /> 09.Memcache::get ?获取一个key?br /> 10.Memcache::getExtendedStats ?获取q程池中所有进E的q行pȝl计<br /> 11.Memcache::getServerStatus ?获取q行服务器的参数<br /> 12.Memcache::getStats ?q回服务器的一些运行统计信?br /> 13.Memcache::getVersion ?q回q行的Memcache的版本信?br /> 14.Memcache::increment ?对保存的某个key中的D行加法操?br /> 15.Memcache::pconnect ?创徏一个Memcache的持久连接对?br /> 16.Memcache::replace ?R对一个已有的keyq行覆写操作<br /> 17.Memcache::set ?d一个|如果已经存在Q则覆写<br /> 18.Memcache::setCompressThreshold ?对大于某一大小的数据进行压~?br /> 19.Memcache::setServerParams ?在运行时修改服务器的参数<br /> <br /> <br /> <img src ="http://www.tkk7.com/ducklyl/aggbug/316262.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ducklyl/" target="_blank">王生?/a> 2010-03-23 11:11 <a href="http://www.tkk7.com/ducklyl/archive/2010/03/23/316262.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Q{QPHP cookie详解http://www.tkk7.com/ducklyl/archive/2009/12/31/307925.html王生?/dc:creator>王生?/author>Thu, 31 Dec 2009 08:22:00 GMThttp://www.tkk7.com/ducklyl/archive/2009/12/31/307925.htmlhttp://www.tkk7.com/ducklyl/comments/307925.htmlhttp://www.tkk7.com/ducklyl/archive/2009/12/31/307925.html#Feedback0http://www.tkk7.com/ducklyl/comments/commentRss/307925.htmlhttp://www.tkk7.com/ducklyl/services/trackbacks/307925.html

bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] )

      setcookie() 定义一个和其余?HTTP 标头一起发送的 cookie。和其它标头一Pcookie 必须在脚本的M其它输出之前发送(q是协议限制Q。这需要将本函数的调用攑ֈM输出之前Q包?<html> ? <head> 标签以及MI格。如果在调用 setcookie() 之前有Q何输出,本函数将p|q返?FALSE。如? setcookie() 函数成功q行Q将q回 TRUE。这q不说明用户是否接受?cookie?/p>

     ? ?PHP 4 P可以用输出缓存来在调用本函数前输出内容,代h(hun)是把所有向览器的输出都缓存在服务器,直到下命令发送它们。可以在代码中? ob_start() ?ob_end_flush() 来实现这L功能Q或者通过修改 php.ini 中的 output_buffering 配置选项来实玎ͼ也可以通过修改服务器配|文件来实现?/p>

      除了 name 外,其它所有参数都是可选的。可以用I字W串Q?"Q替换某参数以蟩q该参数。因为参?expire 是整型,不能用空字符串掉q,可以用零Q?Q来代替 。下面的说明?setcookie() 的每一个参数都q行了解释。可以对?Netscape cookie 规范以了?setcookie() 的每一个参数的l节以及通过阅读 RFC 2965 了解 HTTP cookie 的工作方式?/p>

1. setcookie() 参数详解
参数 说明 举例
name Cookie 的名?/em>Q?nbsp;  使用 $_COOKIE['cookiename'] 调用名ؓ cookiename ?cookie?br /> value Cookie 的?/em>Q此g存在客户端,不要用来保存敏感数据?nbsp;  假定 name ?'cookiename'Q可以通过 $_COOKIE['cookiename'] 取得其倹{?br /> expire Cookie q期的时?/em>Q这是个 Unix 旉戻I即从 Unix U元开始的U数。换而言之,通常? time() 函数再加上秒数来讑֮ cookie 的失效期。或者用 mktime()来实现?nbsp;  time()+60*60*24*30 设? cookie 30 天后失效。如果未讑֮Qcookie 会在会话结束后Q一般是览器关闭)失效?br /> path Cookie 在服务器端的有效路径Q?nbsp;  如果该参数设?'/' 的话Qcookie 在整个 domain 内有效,如果设ؓ '/foo/'Qcookie 只?domain 下的 /foo/ 目录及其子目录内有效Q例?/foo/bar/。默认gؓ讑֮ cookie 的当前目录?br /> domain ?cookie 有效的域?/em>Q?nbsp;  要 cookie 能在?example.com 域名下的所有子域都有效的话Q该参数应该设ؓ '.example.com'。虽?. q不必须的,但加上它会兼Ҏ(gu)多的览器。如果该参数设ؓ www.example.com 的话Q就只在 www 子域内有效。细节见 Cookie 规范中的 tail matching?br /> secure 指明Q?cookie 是否仅通过安全?HTTPS q接传送。当设成 TRUE Ӟcookie 仅在安全的连接中被设|。默认gؓ FALSE?nbsp;  0 ?1

      ?cookie 被设|后Q便可以在其它页面通过 $_COOKIE ?$HTTP_COOKIE_VARS 数组取得其倹{需要注意的是,autoglobals ?$_COOKIE 形式适用?PHP 4.1.0 或更高版本。? $HTTP_COOKIE_VARS 则从 PHP 3 起就可以使用。Cookie 的g会被保存?$_REQUEST 数组中?/p>

     ? 如果 PHP 的选项 register_globals 被设?on 的话Qcookie 的g然会被斌到变量内。在下面的例子中Q?TestCookie 会被注册Q但是仍然推荐?$_COOKIE 数组?/p>

常见~陷Q?/strong>

     *       Cookies 不会在设|它的本는效,要测试一?cookie 是否被成功的讑֮Q可以在其到期之前通过另外一个页面来讉K其倹{过期时间是通过参数 expire 来设|的。可以简单地使用 print_r($_COOKIE); 来调试现有的 cookies?br />
     *       Cookie 必须用和讑֮时的同样的参数才能删除。如果其g个空字符Ԍ或者是 FALSEQƈ且其它的参数都和前一ơ调?setcookie 时相同,那么所指定名称?cookie 会在远E客L被删除?br />
     *       ׃?cookie 的D?FALSE 会客户端尝试删除这?cookieQ所以要?cookie 上保? TRUE ?FALSE 时不应该直接使用 boolean |而应该用 0 来表C?FALSEQ用 1 来表C?TRUE

     *       可以?cookie 的名U设|成一个数l,但是数组 cookie 中的每个元素的值将会被单独保存在用Lpȝ中。考虑使用 explode() 函数用多个名U和D定一?cookie。不推荐? serialize() 用于此目的,因ؓ它可能会D一个安全漏z?/p>

        ?PHP 3 中,在同一?PHP 脚本中多ơ?setcookie() 来设|? cookieQ将会按照倒序的方式来分别执行Q如果想要在插入另外一?cookie 之前删除一?cookieQ要把插入放到删除之前。自 PHP 4 P多次调用 setcookie() 则是按照序来执行的?/p>

下面一些例子说明了如何发?cookieQ?/p>

例子 1. setcookie() 发送例?br /> $value = 'something from somewhere';

setcookie("TestCookie", $value);
setcookie("TestCookie", $value,time()+3600);   /* expire in 1 hour */
setcookie("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca", 1);

注意 cookie 中值的部分在发送的时候会被自动用 urlencode ~码q在接收到的时候被自动解码q把Dl与自己同名? cookie 变量。如果不惌样ƈ且在使用 PHP 5 的话Q可以用 setrawcookie() 来代ѝ下面这个简单的例子可以得到刚才所讑֮?cookie 的|

<?php
// 输出单独?cookie
echo $_COOKIE["TestCookie"];
echo $HTTP_COOKIE_VARS["TestCookie"];

// 另一个调试的Ҏ(gu)是输出所有的 cookie
print_r($_COOKIE);
?>

      要删?cookie 需要确保它的失效期是在q去Q才能触发浏览器的删除机制。下面的例子说明了如何删除刚才设|的 cookieQ?/p>

例子 2. setcookie() 删除例子
// 过期时间设Z时?br /> setcookie("TestCookie", "", time() - 3600);
setcookie("TestCookie", "", time() - 3600, "/~rasmus/", ".utoronto.ca", 1);

      也可以通过?cookie 名称中用数l符h讑֮数组 cookieQ可以设定多?cookie 作ؓ数组单元Q在脚本提取 cookie 时所有的值都攑֜一个数l中Q?/p>

例子 3. setcookie() 中用数l的例子
<?php
// 讑֮ cookie
setcookie("cookie[three]", "cookiethree");
setcookie("cookie[two]", "cookietwo");
setcookie("cookie[one]", "cookieone");

// h面后,昄出来
if (isset($_COOKIE['cookie'])) {
    foreach ($_COOKIE['cookie'] as $name => $value) {
        echo "$name : $value <br />\n";
    }
}
?>

上例输出:

three : cookiethree
two : cookietwo
one : cookieone

     ? 下面的一?RFC 也具参考h(hun)|RFC 2109 ?RFC 2695?/p>

     注意 expire 参数的接受的?Unix 旉戻I而不是日期格?Wdy, DD-Mon-YYYY HH:MM:SS GMTQ这是因?PHP 在内部进行了转换?/p>

     expire 是与客户端的旉相比较,和服务器旉可能不同?/p>

     ? ?Microsoft Internet Explorer 4 Service Pack 1 不能正确处理讑֮?path ?cookie?/p>

     Netscape Communicator 4.05 ?Microsoft Internet Explorer 3.x 不能正确处理没有讑֮ path ?time ?cookie?/p>

参见 header()Qsetrawcookie()



]]>
PHP $_SERVER用法http://www.tkk7.com/ducklyl/archive/2009/11/05/301208.html王生?/dc:creator>王生?/author>Thu, 05 Nov 2009 01:31:00 GMThttp://www.tkk7.com/ducklyl/archive/2009/11/05/301208.htmlhttp://www.tkk7.com/ducklyl/comments/301208.htmlhttp://www.tkk7.com/ducklyl/archive/2009/11/05/301208.html#Feedback0http://www.tkk7.com/ducklyl/comments/commentRss/301208.htmlhttp://www.tkk7.com/ducklyl/services/trackbacks/301208.html1.$_SERVER['HTTP_ACCEPT_LANGUAGE']//览器语a

昄:zh-cn

2.$_SERVER['REMOTE_ADDR'] //当前用户 IP ?

昄:127.0.0.1

3.$_SERVER['REMOTE_HOST'] //当前用户L?

昄:

4.$_SERVER['REQUEST_URI'] //URL

昄:/test.php

5.$_SERVER['REMOTE_PORT'] //端口?

昄:3864

6.$_SERVER['SERVER_NAME'] //服务器主机的名称?

昄:127.0.0.1

7.$_SERVER['PHP_SELF']//正在执行脚本的文件名

昄:/test.php

8.$_SERVER['argv'] //传递给该脚本的参数?/p>

昄:ARRAY

9.$_SERVER['argc'] //传递给E序的命令行参数的个数?

昄:0

10.$_SERVER['GATEWAY_INTERFACE']//CGI 规范的版本?/p>

昄: CGI/1.1

11.$_SERVER['SERVER_SOFTWARE'] //服务器标识的字串

昄:Apache/2.0.52 (Win32) PHP/5.2.1

12.$_SERVER['SERVER_PROTOCOL'] //h面旉信协议的名U和版本

昄:HTTP/1.1

13.$_SERVER['REQUEST_METHOD']//讉K面时的hҎ(gu)

昄:GET

14.$_SERVER['QUERY_STRING'] //查询(query)的字W串?/p>

昄:

15.$_SERVER['DOCUMENT_ROOT'] //当前q行脚本所在的文根目?

昄:D:/Program Files/Apache/www

16.$_SERVER['HTTP_ACCEPT'] //当前h?Accept: 头部的内宏V?/p>

昄:*/*

17.$_SERVER['HTTP_ACCEPT_CHARSET'] //当前h?Accept-Charset: 头部的内宏V?

昄:

18.$_SERVER['HTTP_ACCEPT_ENCODING'] //当前h?Accept-Encoding: 头部的内?

昄:gzip,deflate

19.$_SERVER['HTTP_CONNECTION'] //当前h?Connection: 头部的内宏V例如:“Keep-Alive”?/p>

昄:Keep-Alive

20.$_SERVER['HTTP_HOST'] //当前h?Host: 头部的内宏V?

昄:127.0.0.1:8080

21.$_SERVER['HTTP_REFERER'] //链接到当前页面的前一面?URL 地址?

昄:http://127.0.0.1:8080/

22.$_SERVER['HTTP_USER_AGENT'] //当前h?User_Agent: 头部的内宏V?

昄:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

23.$_SERVER['HTTPS']//如果通过https讉K,则被设ؓ一个非I的?on)Q否则返回off

昄:

24.$_SERVER['SCRIPT_FILENAME'] #当前执行脚本的绝对\径名?

昄:D:/Program Files/Apache/www/test.php

25.$_SERVER['SERVER_ADMIN'] #理员信?

昄:w@w.com

26.$_SERVER['SERVER_PORT'] #服务器所使用的端?

昄:8080

27.$_SERVER['SERVER_SIGNATURE'] #包含服务器版本和虚拟L名的字符丌Ӏ?

昄:Apache/2.0.52 (Win32) PHP/5.2.1 Server at 10.145.40.150 Port 8080

28.$_SERVER['PATH_TRANSLATED'] #当前脚本所在文件系l(不是文根目录)的基本\径?/p>

昄:

29.$_SERVER['SCRIPT_NAME'] #包含当前脚本的\径。这在页面需要指向自己时非常有用?/p>

昄 :/test.php

30.$_SERVER['PHP_AUTH_USER'] #?PHP q行?Apache 模块方式下,q且正在使用 HTTP 认证功能Q这个变量便是用戯入的用户名?/p>

昄:

31.$_SERVER['PHP_AUTH_PW'] #?PHP q行?Apache 模块方式下,q且正在使用 HTTP 认证功能Q这个变量便是用戯入的密码?

昄:

32.$_SERVER['AUTH_TYPE'] #?PHP q行?Apache 模块方式下,q且正在使用 HTTP 认证功能Q这个变量便是认证的cd



]]>
(?谈PHPMYSQL分页原理及实?/title><link>http://www.tkk7.com/ducklyl/archive/2009/10/21/299154.html</link><dc:creator>王生?/dc:creator><author>王生?/author><pubDate>Wed, 21 Oct 2009 02:08:00 GMT</pubDate><guid>http://www.tkk7.com/ducklyl/archive/2009/10/21/299154.html</guid><wfw:comment>http://www.tkk7.com/ducklyl/comments/299154.html</wfw:comment><comments>http://www.tkk7.com/ducklyl/archive/2009/10/21/299154.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ducklyl/comments/commentRss/299154.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ducklyl/services/trackbacks/299154.html</trackback:ping><description><![CDATA[在看本文之前Q请保你已掌握了PHP的一些知识以及MYSQL的查询操作基哦?br /> <br /> 作ؓ一个WebE序Q经常要和不计其数的数据打交道,比如会员的数据,文章数据Q假如只有几十个会员那很好办Q在一|C就可以了,可是假如你的|站是几千甚臛_十万会员的话Q如果都在一|开的话无论Ҏ(gu)览器q是观看者都是一U折?br /> <br /> 怿每个学习PHP的新手都会对分页q个东西感觉很头|不过有了默默的这一水帖Q你肯定会拍拍脑袋说Q嘿Q原来分늫然如此简单?的确Q现在请深呼怸口新鲜的I气Q仔l的听默默给你一点一点的分解?br /> <br /> 假设我们要处?000条数据,要在每页中显C?0条,q样的话׃?00|昄Q咱们先看一看在mysql里提?0条信息是如何操作的?br /> <br /> Select * from table limit 0,10<br /> <br /> 上面是一句很单的mysql查询语句Q它的作用是从一个名叫table的表里提?0条数据,q且把所有字D늚值都获得?br /> <br /> 关键的地方就在这D?#8220;limit 0,10”Q它其中?是以0v始点Q后面的10则是昄10条数据,那么我们要以10v始点Q显C到W?0条数据该怎么写呢Q?br /> <br /> 可能很多大大会心直口快的?#8220;limit 10,20”嘛!啊哦Q这样可错误了哦,正确的写法是“limit 10,10”它后面的参数q是结束点而是要提取的数目Q记住哦?br /> <br /> 懂得了如何提?0条数据,那么提取1000条也是?00ơ这U查询呀Q就是说要做如下的查询:<br /> <br /> Limit 0,10                 //W一?br /> Limit 10,10                 //W二?br /> Limit 20,10                 //W三?br /> Limit 30,10                 //W四?br /> ……<br /> 看出有什么规律了吗?没错Q第一个参数每M就增加10Q可是第二个参数是不变的?br /> 也就是说׃设法Ҏ(gu)|来改变第一个参数的|可以进行分|C数据了Q怎么P原理是不是很单?<br /> <br /> 可是要怎么设法Ҏ(gu)|来改变第一个参数的值呢Q首先,׃要有一个页数的|用url的GET方式获取?br /> 比如index.php?page=18<br /> 怿大部分的大大对这个东西不陌生吧,q种url地址可是随处可见Q其中的page参数的作用就是传入要昄的页数?br /> <br /> ׃通过一D代码来看一看究竟是如何实现的吧Q?br /> <div style="overflow: auto;"><code><span style="color: #000000;"> <br /> <span style="color: #0000bb;"><?php <br /> <br /> </span><span style="color: #ff8000;">/* <br /> <br /> Author:默默 <br /> Date   :2006-12-03 <br /> <br /> */ <br /> <br /> </span><span style="color: #0000bb;">$page</span><span style="color: #007700;">=isset(</span><span style="color: #0000bb;">$_GET</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'page'</span><span style="color: #007700;">])?</span><span style="color: #0000bb;">intval</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_GET</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'page'</span><span style="color: #007700;">]):</span><span style="color: #0000bb;">1</span><span style="color: #007700;">;        </span><span style="color: #ff8000;">//q句是获取page=18中的page的|假如不存在pageQ那么页数就??<br /> </span><span style="color: #0000bb;">$num</span><span style="color: #007700;">=</span><span style="color: #0000bb;">10</span><span style="color: #007700;">;                                      </span><span style="color: #ff8000;">//每页昄10条数?<br /> <br /> </span><span style="color: #0000bb;">$db</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_connect</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"host"</span><span style="color: #007700;">,</span><span style="color: #dd0000;">"name"</span><span style="color: #007700;">,</span><span style="color: #dd0000;">"pass"</span><span style="color: #007700;">);           </span><span style="color: #ff8000;">//创徏数据库连?<br /> </span><span style="color: #0000bb;">$select</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_select_db</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"db"</span><span style="color: #007700;">,</span><span style="color: #0000bb;">$db</span><span style="color: #007700;">);                 </span><span style="color: #ff8000;">//选择要操作的数据?<br /> <br /> /* <br /> 首先׃要获取数据库中到底有多少数据Q才能判断具体要分多页Q具体的公式是 <br /> L据数除以每页昄的条敎ͼ有余q一?<br /> 也就是说10/3=3.3333=4 有余数就要进一?<br /> */ <br /> <br /> </span><span style="color: #0000bb;">$total</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_num_rows</span><span style="color: #007700;">(</span><span style="color: #0000bb;">mysql_query</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"select id from table"</span><span style="color: #007700;">)); </span><span style="color: #ff8000;">//查询数据的L,id是数据库中的一个自动赋值的字段 <br /> </span><span style="color: #0000bb;">$pagenum</span><span style="color: #007700;">=</span><span style="color: #0000bb;">ceil</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$total</span><span style="color: #007700;">/</span><span style="color: #0000bb;">$num</span><span style="color: #007700;">);                                    </span><span style="color: #ff8000;">//获得总页?<br /> <br /> //假如传入的页数参数大于总页敎ͼ则显C错误信?<br /> </span><span style="color: #007700;">If(</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">></span><span style="color: #0000bb;">$pagenum </span><span style="color: #007700;">|| </span><span style="color: #0000bb;">$page </span><span style="color: #007700;">== </span><span style="color: #0000bb;">0</span><span style="color: #007700;">){ <br />         Echo </span><span style="color: #dd0000;">"Error : Can Not Found The page ."</span><span style="color: #007700;">; <br />         Exit; <br /> } <br /> <br /> </span><span style="color: #0000bb;">$offset</span><span style="color: #007700;">=(</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">-</span><span style="color: #0000bb;">1</span><span style="color: #007700;">)*</span><span style="color: #0000bb;">$num</span><span style="color: #007700;">;                                        </span><span style="color: #ff8000;">//获取limit的第一个参数的|假如W一则?1-1)*10=0,W二ؓ(2-1)*10=10?<br /> <br /> </span><span style="color: #0000bb;">$info</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_query</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"select name from table limit $offset,$num"</span><span style="color: #007700;">);   </span><span style="color: #ff8000;">//获取相应|所需要显C的数据,name是数据里的一个字D?<br /> </span><span style="color: #007700;">While(</span><span style="color: #0000bb;">$it</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_fetch_array</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$info</span><span style="color: #007700;">)){ <br />         Echo </span><span style="color: #0000bb;">$it</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'name'</span><span style="color: #007700;">].</span><span style="color: #dd0000;">"<br />"</span><span style="color: #007700;">; <br /> }                                                              </span><span style="color: #ff8000;">//昄数据 <br />     <br /> </span><span style="color: #007700;">For(</span><span style="color: #0000bb;">$i</span><span style="color: #007700;">=</span><span style="color: #0000bb;">1</span><span style="color: #007700;">;</span><span style="color: #0000bb;">$i</span><span style="color: #007700;"><=</span><span style="color: #0000bb;">$pagenum</span><span style="color: #007700;">;</span><span style="color: #0000bb;">$i</span><span style="color: #007700;">++){ <br />         <br />        </span><span style="color: #0000bb;">$show</span><span style="color: #007700;">=(</span><span style="color: #0000bb;">$i</span><span style="color: #007700;">!=</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">)?</span><span style="color: #dd0000;">"<a href='index.php?page="</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$i</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"'>$i</a>"</span><span style="color: #007700;">:</span><span style="color: #dd0000;">"<b>$i</b>"</span><span style="color: #007700;">; <br />         Echo </span><span style="color: #0000bb;">$show</span><span style="color: #007700;">.</span><span style="color: #dd0000;">" "</span><span style="color: #007700;">; <br /> } <br /> <br /> </span><span style="color: #ff8000;">/*昄分页信息Q假如是当页则显C粗体的数字Q其余的|则ؓ连接,假如当前为第三页则显C如?<br /> 1 2 3 4 5 6 <br /> */ <br /> </span><span style="color: #0000bb;">?> <br /> </span> </span> </code></div> <br /> 假如你仔l的读过上面的代码,把数据库q接和查询的表替换成你的Q那么就能看见它的执行效果哦?br /> <br /> 是不是很单,只要动动脑筋Q可以让它显C的更ؓ个性化哦,l大家出一个小题,如何实现“首页 上一?下一?N”q种格式的分呢Q?br /> <br /> OKQ水帖灌完,收工。^_^ <br /> 辉老大『阿辉?<br /> 好帖子啊Q我来顶默默的提问,代码Q如下:<br /> <code><span style="color: #000000;"> <br /> <span style="color: #0000bb;"><?php <br /> </span><span style="color: #ff8000;">/* <br /> Author:默默 <br /> Date   :2006-12-03 <br /> */ <br /> <br /> </span><span style="color: #0000bb;">$page</span><span style="color: #007700;">=isset(</span><span style="color: #0000bb;">$_GET</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'page'</span><span style="color: #007700;">])?</span><span style="color: #0000bb;">intval</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_GET</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'page'</span><span style="color: #007700;">]):</span><span style="color: #0000bb;">1</span><span style="color: #007700;">;        </span><span style="color: #ff8000;">//q句是获取page=18中的page的|假如不存在pageQ那么页数就??<br /> </span><span style="color: #0000bb;">$num</span><span style="color: #007700;">=</span><span style="color: #0000bb;">10</span><span style="color: #007700;">;                                      </span><span style="color: #ff8000;">//每页昄10条数?<br /> <br /> </span><span style="color: #0000bb;">$db</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_connect</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"localhost"</span><span style="color: #007700;">,</span><span style="color: #dd0000;">"root"</span><span style="color: #007700;">,</span><span style="color: #dd0000;">"7529639"</span><span style="color: #007700;">);           </span><span style="color: #ff8000;">//创徏数据库连?<br /> </span><span style="color: #0000bb;">mysql_select_db</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"cr_download"</span><span style="color: #007700;">);                 </span><span style="color: #ff8000;">//选择要操作的数据?<br /> <br /> /* <br /> 首先׃要获取数据库中到底有多少数据Q才能判断具体要分多页Q具体的公式是 <br /> L据库除以每页昄的条敎ͼ有余q一?<br /> 也就是说10/3=3.3333=4 有余数就要进一?<br /> */ <br /> <br /> </span><span style="color: #0000bb;">$result</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_query</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"select * from cr_userinfo"</span><span style="color: #007700;">); <br /> </span><span style="color: #0000bb;">$total</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_num_rows</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$result</span><span style="color: #007700;">); </span><span style="color: #ff8000;">//查询所有的数据 <br /> <br /> </span><span style="color: #0000bb;">$url</span><span style="color: #007700;">=</span><span style="color: #dd0000;">'test.php'</span><span style="color: #007700;">;</span><span style="color: #ff8000;">//获取本页URL <br /> <br /> //늠计算 <br /> </span><span style="color: #0000bb;">$pagenum</span><span style="color: #007700;">=</span><span style="color: #0000bb;">ceil</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$total</span><span style="color: #007700;">/</span><span style="color: #0000bb;">$num</span><span style="color: #007700;">);                                    </span><span style="color: #ff8000;">//获得总页?也是最后一?<br /> </span><span style="color: #0000bb;">$page</span><span style="color: #007700;">=</span><span style="color: #0000bb;">min</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$pagenum</span><span style="color: #007700;">,</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">);</span><span style="color: #ff8000;">//获得首页 <br /> </span><span style="color: #0000bb;">$prepg</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">-</span><span style="color: #0000bb;">1</span><span style="color: #007700;">;</span><span style="color: #ff8000;">//上一?<br /> </span><span style="color: #0000bb;">$nextpg</span><span style="color: #007700;">=(</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">==</span><span style="color: #0000bb;">$pagenum </span><span style="color: #007700;">? </span><span style="color: #0000bb;">0 </span><span style="color: #007700;">: </span><span style="color: #0000bb;">$page</span><span style="color: #007700;">+</span><span style="color: #0000bb;">1</span><span style="color: #007700;">);</span><span style="color: #ff8000;">//下一?<br /> </span><span style="color: #0000bb;">$offset</span><span style="color: #007700;">=(</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">-</span><span style="color: #0000bb;">1</span><span style="color: #007700;">)*</span><span style="color: #0000bb;">$num</span><span style="color: #007700;">;                                        </span><span style="color: #ff8000;">//获取limit的第一个参数的|假如W一则?1-1)*10=0,W二ؓ(2-1)*10=10?<br /> <br /> //开始分导航条代码Q?<br /> </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">=</span><span style="color: #dd0000;">"昄W?<B>"</span><span style="color: #007700;">.(</span><span style="color: #0000bb;">$total</span><span style="color: #007700;">?(</span><span style="color: #0000bb;">$offset</span><span style="color: #007700;">+</span><span style="color: #0000bb;">1</span><span style="color: #007700;">):</span><span style="color: #0000bb;">0</span><span style="color: #007700;">).</span><span style="color: #dd0000;">"</B>-<B>"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">min</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$offset</span><span style="color: #007700;">+</span><span style="color: #0000bb;">10</span><span style="color: #007700;">,</span><span style="color: #0000bb;">$total</span><span style="color: #007700;">).</span><span style="color: #dd0000;">"</B> 条记录,?$total 条记?"</span><span style="color: #007700;">; <br /> <br /> <br /> </span><span style="color: #ff8000;">//如果只有一则跛_函数Q?<br /> </span><span style="color: #007700;">if(</span><span style="color: #0000bb;">$pagenum</span><span style="color: #007700;"><=</span><span style="color: #0000bb;">1</span><span style="color: #007700;">) return </span><span style="color: #0000bb;">false</span><span style="color: #007700;">; <br /> <br /> </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">" <a href='$url?page=1'>首页</a> "</span><span style="color: #007700;">; <br /> if(</span><span style="color: #0000bb;">$prepg</span><span style="color: #007700;">) </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">" <a href='$url?page=$prepg'>前页</a> "</span><span style="color: #007700;">; else </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">" 前页 "</span><span style="color: #007700;">; <br /> if(</span><span style="color: #0000bb;">$nextpg</span><span style="color: #007700;">) </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">" <a href='$url?page=$nextpg'>后页</a> "</span><span style="color: #007700;">; else </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">" 后页 "</span><span style="color: #007700;">; <br /> </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">" <a href='$url?page=$pagenum'>N</a> "</span><span style="color: #007700;">; <br /> <br /> </span><span style="color: #ff8000;">//下拉跌{列表Q@环列出所有页码: <br /> </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">" 到第 <select name='topage' size='1' onchange='window.location=""$url?page=""+this.value'>"n"</span><span style="color: #007700;">; <br /> for(</span><span style="color: #0000bb;">$i</span><span style="color: #007700;">=</span><span style="color: #0000bb;">1</span><span style="color: #007700;">;</span><span style="color: #0000bb;">$i</span><span style="color: #007700;"><=</span><span style="color: #0000bb;">$pagenum</span><span style="color: #007700;">;</span><span style="color: #0000bb;">$i</span><span style="color: #007700;">++){ <br /> if(</span><span style="color: #0000bb;">$i</span><span style="color: #007700;">==</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">) </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">"<option value='$i' selected>$i</option>"n"</span><span style="color: #007700;">; <br /> else </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">"<option value='$i'>$i</option>"n"</span><span style="color: #007700;">; <br /> } <br /> </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">.=</span><span style="color: #dd0000;">"</select> ,?$pagenum ?</span><span style="color: #007700;">; <br /> <br /> </span><span style="color: #ff8000;">//假如传入的页数参数大于总页敎ͼ则显C错误信?<br /> </span><span style="color: #007700;">If(</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">></span><span style="color: #0000bb;">$pagenum</span><span style="color: #007700;">){ <br />         Echo </span><span style="color: #dd0000;">"Error : Can Not Found The page "</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$page</span><span style="color: #007700;">; <br />         Exit; <br /> } <br /> <br /> </span><span style="color: #0000bb;">$info</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_query</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"select * from cr_userinfo limit $offset,$num"</span><span style="color: #007700;">);   </span><span style="color: #ff8000;">//获取相应|所需要显C的数据 <br /> </span><span style="color: #007700;">While(</span><span style="color: #0000bb;">$it</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_fetch_array</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$info</span><span style="color: #007700;">)){ <br />         Echo </span><span style="color: #0000bb;">$it</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'username'</span><span style="color: #007700;">]; <br />         echo </span><span style="color: #dd0000;">"<br>"</span><span style="color: #007700;">; <br /> }                                                              </span><span style="color: #ff8000;">//昄数据 <br />   </span><span style="color: #007700;">echo</span><span style="color: #dd0000;">"<br>"</span><span style="color: #007700;">; <br />    echo </span><span style="color: #0000bb;">$pagenav</span><span style="color: #007700;">;</span><span style="color: #ff8000;">//输出分页D <br /> </span><span style="color: #0000bb;">?><br /> <br /> <br /> 转自 http://www.cnblogs.com/justforfun/archive/2009/04/27/1444358.html<br /> </span></span></code> <img src ="http://www.tkk7.com/ducklyl/aggbug/299154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ducklyl/" target="_blank">王生?/a> 2009-10-21 10:08 <a href="http://www.tkk7.com/ducklyl/archive/2009/10/21/299154.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>(?PHP的单例模?/title><link>http://www.tkk7.com/ducklyl/archive/2008/11/15/240704.html</link><dc:creator>王生?/dc:creator><author>王生?/author><pubDate>Sat, 15 Nov 2008 09:52:00 GMT</pubDate><guid>http://www.tkk7.com/ducklyl/archive/2008/11/15/240704.html</guid><wfw:comment>http://www.tkk7.com/ducklyl/comments/240704.html</wfw:comment><comments>http://www.tkk7.com/ducklyl/archive/2008/11/15/240704.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ducklyl/comments/commentRss/240704.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ducklyl/services/trackbacks/240704.html</trackback:ping><description><![CDATA[<div class="ogqwicy" id="blog_text" class="cnt"> <h4 style="margin-bottom: 0px; line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;">单例模式 有以下的特点Q?</strong></strong></h4> <div style="font-size: 12px; filter: none; visibility: visible ! important; line-height: normal;"> <ol style="line-height: normal;"> <li style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><font size="3">单例cd能有一个实例?/font></strong></strong></li> <li style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><font size="3">单例cd自己创q唯一的实例?/font></strong></strong></li> <li style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><font size="3">单例cdȝ所有其他对象提供这一实例?/font></strong></strong></li> </ol> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><font size="3">代码Q?/font> </strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><font size="3">Singleton.<strong style="color: black; line-height: normal; background-color: #ffff66;">php :<br style="line-height: normal;" /> <br style="line-height: normal;" /> <?<strong style="color: black; line-height: normal; background-color: #ffff66;">php <br style="line-height: normal;" /> class Singleton<br style="line-height: normal;" /> {<br style="line-height: normal;" />     private static $instance;</strong></strong></font></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">    private function __construct()<br style="line-height: normal;" />     {<br style="line-height: normal;" />     }</font></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">    public static function getInstance()<br style="line-height: normal;" />     {<br style="line-height: normal;" />         if(self::$instance == null)<br style="line-height: normal;" />         {<br style="line-height: normal;" />             self::$instance = new Singleton();<br style="line-height: normal;" />         }</font></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">        return self::$instance;<br style="line-height: normal;" />     }<br style="line-height: normal;" /> }<br style="line-height: normal;" /> ?></font></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">在用的时候,因ؓ构造方法是privateQ私有)的,所以是不能直接实例化的Q必M用类g面的Ҏ(gu)Q?/font></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><font size="3">例子Q?/font> </strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><font size="3"><?<strong style="color: black; line-height: normal; background-color: #ffff66;">php <br style="line-height: normal;" /> require_once('Singleton.<strong style="color: black; line-height: normal; background-color: #ffff66;">php ');<br style="line-height: normal;" /> <br style="line-height: normal;" /> <u style="line-height: normal;">$instance = Singleton::getInstance();</u><br style="line-height: normal;" /> ?></strong></strong></font></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">============================================</font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">其它关于静态的说明</font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">静态成? <br style="line-height: normal;" /> 他在c被声明时就产生了,也就是在E序~译阶段产生的,它只有一个所有该cd例共享的原本QQ何该cd例更攚w态变量的值后Q其它该cd例再去访问该静态变量,其值已l变成更改后的|因ؓ其在内存Q就存一个原本?<br style="line-height: normal;" /> 非静态成员是在类实例化时产生的,你new一个该cd例,pȝ׃cd例的所有非静态成员新开辟一个空_每个实例都只能自q非静态成员。(有多个cȝ实例Q就要开辟多个非静态成员的I间Q?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">单例cd局只有一个实例,你可以把它看成全局对象?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">从底层来_~译完成后主要是两个部分Q一是CPU指oQ这一部分包含各种Ҏ(gu)Q二是数据,也就是程序定义的各种cd的变量。运行程序实例化一个对象时Q按如下方式分配内存Q?br style="line-height: normal;" /> 1。在E序启动时将静态数据和静态方法放入堆内存中?br style="line-height: normal;" /> 2。第一ơ实例化对象时将其它Ҏ(gu)攑օ代码D中?br style="line-height: normal;" /> 3。每ơ实例化对象时将其它数据攑օ栈内存中?br style="line-height: normal;" /> 实例化同一个对象时Q上q??不动,只是再加一个第Q项卛_。销毁一个实例的时候,如果q有其它的实例存在,只释放该实例的栈数据段(上述W3??/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">Ҏ(gu)以上原理回答(zhn)的问题<br style="line-height: normal;" /> 静态方法和数据一般都是Public型的Q用于类的极普遍的事物处理,可以在程序的L地方调用Q在整过E序q行q程中始l占用计机内存Q一搬少用。如果一个程序中的各个对象都用一个数据库的话Q可以用静态方法连接?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">单g模式的实例销毁时可以释放所有的非静态方法和数据Q,如果把这个类的所有方法都设计为静态的Q这些方法将一直占用内存,费资源Q不可取?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">在new一个对象时Q只是加一个数据段Qƈ不重新加载方法和静态变量?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">最后说一个变量传送的问题Q网上很多朋友在回答cM间参C递时都说用静态变量,我认U方法不好,本来加类的目的就是ؓ了封装,如果用一个类g全局变量的静态变量作为参数就大大削弱了封装的意义?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">实际上,pȝ和应用程序对内存的管理相当复杂.<br style="line-height: normal;" /> =======================下面摘自思归的文?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">从表面上看,静?static)成员可以通过 cd.成员?来直接调用,而实?instance)成员需要生成一个对象后才能调用。同一个操作,性能当然静态成员好</font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">但其实区别是跟对象设计有关的Q一般来说实例成员跟实例的状态有养I某个Ҏ(gu)的调用可能需要访问当前对象的状态,q改变其状态,从而媄响其他方法的l果</font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">而静态成员是跟类本n有关Q与单独的实例状态无兟뀂但静态成员不要太多了Q否则就沦ؓ以前的procedural programming风格了,也许对象需要重新设计或重构?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> <p style="line-height: normal;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #a0ffff;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="line-height: normal;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><strong style="color: black; line-height: normal; background-color: #ffff66;"><font size="3">静态成员往往会在多线E下操作Q需要做同步化控?/font></strong></strong></strong></strong></strong></strong></strong></strong></p> </div> </div> <img src ="http://www.tkk7.com/ducklyl/aggbug/240704.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ducklyl/" target="_blank">王生?/a> 2008-11-15 17:52 <a href="http://www.tkk7.com/ducklyl/archive/2008/11/15/240704.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>(?优化PHP代码?0条徏?/title><link>http://www.tkk7.com/ducklyl/archive/2008/11/15/240703.html</link><dc:creator>王生?/dc:creator><author>王生?/author><pubDate>Sat, 15 Nov 2008 09:51:00 GMT</pubDate><guid>http://www.tkk7.com/ducklyl/archive/2008/11/15/240703.html</guid><wfw:comment>http://www.tkk7.com/ducklyl/comments/240703.html</wfw:comment><comments>http://www.tkk7.com/ducklyl/archive/2008/11/15/240703.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ducklyl/comments/commentRss/240703.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ducklyl/services/trackbacks/240703.html</trackback:ping><description><![CDATA[<p>优化PHP代码?0条徏?br /> 40 Tips for optimizing your php Code<br /> 原文地址Q?a >http://reinholdweber.com/?p=3</a><br /> 英文版权归Reinhold Weber所有,中译文作者yangyangQaka davidkoreeQ。双语版可用于非商业传播Q但L明英文版作者、版权信息,以及中译文作者。翻译水qx限,请广大PHPer指正?/p> <p>1. If a method can be static, declare it static. Speed improvement is by a factor of 4. 如果一个方法可静态化Q就对它做静态声明。速率可提升至4倍?/p> <p>2. echo is faster than print. echo ?print 快?/p> <p>3. Use echo’s multiple parameters instead of string concatenation. 使用echo的多重参敎ͼ译注Q指用逗号而不是句点)代替字符串连接?/p> <p>4. Set the maxvalue for your for-loops before and not in the loop. 在执行for循环之前定最大@环数Q不要每循环一ơ都计算最大倹{?/p> <p>5. Unset your variables to free memory, especially large arrays. 注销那些不用的变量尤其是大数l,以便释放内存?/p> <p>6. Avoid magic like __get, __set, __autoload 量避免使用__getQ__setQ__autoload?/p> <p>7. require_once() is expensive require_once()代h(hun)昂贵?/p> <p>8. Use full paths in includes and requires, less time spent on resolving the OS paths. 在包含文件时使用完整路径Q解析操作系l\径所需的时间会更少?/p> <p>9. If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time() 如果你想知道脚本开始执行(译注Q即服务器端收到客户端请求)的时刻,使用$_SERVER[‘REQUEST_TIME’]要好于time()?/p> <p>10. See if you can use strncasecmp, strpbrk and stripos instead of regex. 查是否能用strncasecmpQstrpbrkQstripos函数代替正则表达式完成相同功能?/p> <p>11. str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4. str_replace函数比preg_replace函数快,但strtr函数的效率是str_replace函数的四倍?/p> <p>12. If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments. 如果一个字W串替换函数Q可接受数组或字W作为参敎ͼq且参数长度不太长,那么可以考虑额外写一D|换代码,使得每次传递参数是一个字W,而不是只写一? 代码接受数组作ؓ查询和替换的参数?/p> <p>13. It’s better to use select statements than multi if, else if, statements. 使用选择分支语句Q译注:即switch caseQ好于用多个ifQelse if语句?/p> <p>14. Error suppression with @ is very slow. 用@屏蔽错误消息的做法非怽效?/p> <p>15. Turn on apache’s mod_deflate 打开apache的mod_deflate模块?/p> <p>16. Close your database connections when you’re done with them. 数据库连接当使用完毕时应x?/p> <p>17. $row[’id’] is 7 times faster than $row[id]. $row[‘id’]的效率是$row[id]?倍?/p> <p>18. Error messages are expensive. 错误消息代h(hun)昂贵?/p> <p>19. Do not use functions inside of for loop, such as for ($x=0; $x < count($array); $x) The count() function gets called each time. 量不要在for循环中用函敎ͼ比如for ($x=0; $x < count($array); $x)每@环一ơ都会调用count()函数?/p> <p>20. Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function. 在方法中递增局部变量,速度是最快的。几乎与在函C调用局部变量的速度相当?/p> <p>21. Incrementing a global variable is 2 times slow than a local var. 递增一个全局变量要比递增一个局部变量慢2倍?/p> <p>22. Incrementing an object property (eg. $this->prop++) is 3 times slower than a local variable. 递增一个对象属性(如:$this->prop++Q要比递增一个局部变量慢3倍?/p> <p>23. Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one. 递增一个未预定义的局部变量要比递增一个预定义的局部变量慢9?0倍?/p> <p>24. Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists. 仅定义一个局部变量而没在函C调用它,同样会减慢速度Q其E度相当于递增一个局部变量)。PHP大概会检查看是否存在全局变量?/p> <p>25. Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance. Ҏ(gu)调用看来与类中定义的Ҏ(gu)的数量无养I因ؓ我(在测试方法之前和之后都)d?0个方法,但性能上没有变化?/p> <p>26. Methods in derived classes run faster than ones defined in the base class. zcM的方法运行v来要快于在基cM定义的同LҎ(gu)?/p> <p>27. A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations. 调用带有一个参数的I函敎ͼ其花费的旉相当于执??ơ的局部变量递增操作。类似的Ҏ(gu)调用所p的时间接q于15ơ的局部变量递增操作?/p> <p>28. Surrounding your string by ‘ instead of " will make things interpret a little faster since php looks for variables inside "…" but not inside ‘…’. Of course you can only do this when you don’t need to have variables in the string. 用单引号代替双引h包含字符Ԍq样做会更快一些。因为PHP会在双引号包围的字符串中搜寻变量Q单引号则不会。当Ӟ只有当你不需要在字符串中包含? 量时才可以这么做?/p> <p>29. When echoing strings it’s faster to separate them by comma instead of dot. Note: This only works with echo, which is a function that can take several strings as arguments. 输出多个字符串时Q用逗号代替句点来分隔字W串Q速度更快。注意:只有echo能这么做Q它是一U可以把多个字符串当作参数的“函数”Q译注:PHP手册 中说echo是语al构Q不是真正的函数Q故把函数加上了双引P?/p> <p>30. A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts. Apache解析一个PHP脚本的时间要比解析一个静态HTML面??0倍。尽量多用静态HTML面Q少用脚本?/p> <p>31. Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times. 除非脚本可以~存Q否则每ơ调用时都会重新~译一ơ。引入一套PHP~存机制通常可以提升25%?00%的性能Q以免除~译开销?/p> <p>32. Cache as much as possible. Use memcached - memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. OP code caches are useful so that your script does not have to be compiled on every request. 量做缓存,可用memcached。memcached是一N性能的内存对象缓存系l,可用来加速动态Web应用E序Q减L据库负蝲。对q算? (OP code)的缓存很有用Q得脚本不必ؓ每个h做重新编译?/p> <p>33. When working with strings and you need to check that the string is either of a certain length you’d understandably would want to use the strlen() function. This function is pretty quick since it’s operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase & hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using an isset() trick. 当操作字W串q要检验其长度是否满某种要求Ӟ你想当然C使用strlen()函数。此函数执行h相当快,因ؓ它不做Q何计,只返回在zval l构QC的内|数据结构,用于存储PHP变量Q中存储的已知字W串长度。但是,׃strlen()是函敎ͼ多多少会有些慢Q因为函数调用会l过诸多? 骤,如字母小写化Q译注:指函数名写化,PHP不区分函数名大小写)、哈希查找,会跟随被调用的函Ch行。在某些情况下,你可以用isset() 技巧加速执行你的代码?/p> <p>Ex.QD例如下)<br /> if (strlen($foo) < 5) { echo "Foo is too short"; }<br /> vs.Q与下面的技巧做比较Q?br /> if (!isset($foo{5})) { echo "Foo is too short"; }</p> <p>Calling isset() happens to be faster then strlen() because unlike strlen(), isset() is a language construct and not a function meaning that it’s execution does not require function lookups and lowercase. This means you have virtually no overhead on top of the actual code that determines the string’s length. 调用isset()恰y比strlen()快,因ؓ与后者不同的是,isset()作ؓ一U语al构Q意味着它的执行不需要函数查扑֒字母写化。也是 _实际上在验字W串长度的顶层代码中你没有花太多开销?/p> <p>34. When incrementing or decrementing the value of the variable $i++ happens to be a tad slower then ++$i. This is something PHP specific and does not apply to other languages, so don’t go modifying your C or Java code thinking it’ll suddenly become faster, it won’t. ++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend’s PHP optimizer. It is still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer. 当执行变?i的递增或递减Ӟ$i++会比++$i慢一些。这U差异是PHPҎ(gu)的,q不适用于其他语aQ所以请不要修改你的C或Java代码q指望它 们能立即变快Q没用的?+$i更快是因为它只需?条指?opcodes)Q?i++则需?条指令。后|递增实际上会产生一个时变量,q个临时? 量随后被递增。而前|递增直接在原g递增。这是最优化处理的一U,正如Zend的PHP优化器所作的那样。牢记这个优化处理不׃ؓ一个好LQ因为ƈ? 是所有的指o优化器都会做同样的优化处理,q且存在大量没有装配指o优化器的互联|服务提供商QISPsQ和服务器?/p> <p>35. Not everything has to be OOP, often it is too much overhead, each method and object call consumes a lot of memory. q不是事必面向对?OOP)Q面向对象往往开销很大Q每个方法和对象调用都会消耗很多内存?/p> <p>36. Do not implement every data structure as a class, arrays are useful, too. q要用cd现所有的数据l构Q数l也很有用?/p> <p>37. Don’t split methods too much, think, which code you will really re-use. 不要把方法细分得q多Q仔l想想你真正打算重用的是哪些代码Q?/p> <p>38. You can always split the code of a method later, when needed. 当你需要时Q你总能把代码分解成Ҏ(gu)?/p> <p>39. Make use of the countless predefined functions. 量采用大量的PHP内置函数?/p> <p>40. If you have very time consuming functions in your code, consider writing them as C extensions. 如果在代码中存在大量耗时的函敎ͼ你可以考虑用C扩展的方式实现它们?/p> <p>41. Profile your code. A profiler shows you, which parts of your code consumes how many time. The Xdebug debugger already contains a profiler. Profiling shows you the bottlenecks in overview. 评估?profile)你的代码。检验器会告诉你Q代码的哪些部分消耗了多少旉。Xdebug调试器包含了验程序,评估验M上可以显C出代码 的瓶颈?/p> <p>42. mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%. mod_zip可作为Apache模块Q用来即时压~你的数据,q可让数据传输量降低80%?/p> <p>43. Excellent Article Q?a >http://phplens.com/lens/php-book/optimizing-debugging-php.php</a>Qabout optimizing php by John Lim 另一优化PHP的精彩文章,由John Lim撰写?/p> <img src ="http://www.tkk7.com/ducklyl/aggbug/240703.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ducklyl/" target="_blank">王生?/a> 2008-11-15 17:51 <a href="http://www.tkk7.com/ducklyl/archive/2008/11/15/240703.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Q{QPHP cookie和session的分?/title><link>http://www.tkk7.com/ducklyl/archive/2008/09/25/231193.html</link><dc:creator>王生?/dc:creator><author>王生?/author><pubDate>Thu, 25 Sep 2008 13:04:00 GMT</pubDate><guid>http://www.tkk7.com/ducklyl/archive/2008/09/25/231193.html</guid><wfw:comment>http://www.tkk7.com/ducklyl/comments/231193.html</wfw:comment><comments>http://www.tkk7.com/ducklyl/archive/2008/09/25/231193.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ducklyl/comments/commentRss/231193.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ducklyl/services/trackbacks/231193.html</trackback:ping><description><![CDATA[     摘要: 1. PHP的COOKIE cookie 是一U在q程览器端储存数据q以此来跟踪和识别用L机制?PHP在http协议的头信息里发送cookie, 因此 setcookie() 函数必须在其它信息被输出到浏览器前调用,q和?nbsp;header() 函数的限制类伹{? 1.1 讄cookie:  ...  <a href='http://www.tkk7.com/ducklyl/archive/2008/09/25/231193.html'>阅读全文</a><img src ="http://www.tkk7.com/ducklyl/aggbug/231193.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ducklyl/" target="_blank">王生?/a> 2008-09-25 21:04 <a href="http://www.tkk7.com/ducklyl/archive/2008/09/25/231193.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://avdaka.com" target="_blank">Ƶ</a>| <a href="http://ydysmedia.com" target="_blank">ɫƵ߹ۿ</a>| <a href="http://www-456446.com" target="_blank">2022ѹƷ</a>| <a href="http://moushengguigz.com" target="_blank">ҹҹˬ888Ƶ</a>| <a href="http://ulihix.com" target="_blank">һѹۿ</a>| <a href="http://fangdazd.com" target="_blank">91þþƷһ</a>| <a href="http://557265.com" target="_blank">AVһ</a>| <a href="http://zc-zk.com" target="_blank">˿wwwѸ</a>| <a href="http://ziniurj.com" target="_blank">ĻۺϾþ</a>| <a href="http://www988555.com" target="_blank">ɫػaëƬѹۿ</a>| <a href="http://8mav958.com" target="_blank">avһ߹ۿ</a>| <a href="http://sdhuamo.com" target="_blank">ѵĻɫҳѹۿ</a>| <a href="http://jcss99.com" target="_blank">޳aƬ߹ۿʦ</a>| <a href="http://www-75044.com" target="_blank">xxxxձ߲Ѳ</a>| <a href="http://gdbobo.com" target="_blank">޹¶</a>| <a href="http://haohaoshuo.com" target="_blank">Ůҹ24ʽƵ</a>| <a href="http://2xpp.com" target="_blank">޸Ƶ</a>| <a href="http://jdvgo.com" target="_blank">պƵ</a>| <a href="http://sjmthanks.com" target="_blank">xxxxձ߲Ѳ</a>| <a href="http://mogo321.com" target="_blank">˳ɵӰԺ߹ۿ</a>| <a href="http://0102008.com" target="_blank">½һëƬƵۿ</a>| <a href="http://doubaye.com" target="_blank">ĻëƬѿ</a>| <a href="http://rr7733.com" target="_blank">ƷպAVһ </a>| <a href="http://cdessc.com" target="_blank">ѵƵ</a>| <a href="http://15831883389.com" target="_blank">ëƬѹۿվ</a>| <a href="http://942woool.com" target="_blank">ڳ˾Ʒձ </a>| <a href="http://079566.com" target="_blank">˳վ߹ۿ</a>| <a href="http://www33399.com" target="_blank">պƷһ </a>| <a href="http://www678678.com" target="_blank">һ͵Ů</a>| <a href="http://shiliuvip.com" target="_blank">ëƬѹۿ</a>| <a href="http://niutextile.com" target="_blank">³³ƵѲ</a>| <a href="http://wenbye.com" target="_blank">޹˾žۺ</a>| <a href="http://7778tv.com" target="_blank">޹ƷVA߿</a>| <a href="http://ikybh.com" target="_blank">aaһƬѹۿ</a>| <a href="http://9xcb.com" target="_blank">̱߳ˬƵվ</a>| <a href="http://dazhe777.com" target="_blank">ŷ޹Ʒ㶮</a>| <a href="http://sy8989.com" target="_blank">ƷĻ߹ۿ</a>| <a href="http://www-715111.com" target="_blank">Ʒվ</a>| <a href="http://abab14.com" target="_blank">þAV</a>| <a href="http://ymtphoto.com" target="_blank">պƷһ</a>| <a href="http://shzzhsy.com" target="_blank">鶹紫ýƷ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>