<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[Claymore's blog]]></title>
<link><![CDATA[http://claymore.phpme.info/]]></link>
<description><![CDATA[Ajax,C,C++,Java,语言,PHP,脚本,Python,Unix,Linux,Web,开发,Windows,技术,新闻,读物,操作系统,杂项,资源,流程,方法,程序,设计,编程,工具,语言,网络,安全,职场,生涯,轶事,趣闻]]></description>
<language>zh-cn</language>
<copyright><![CDATA[PhpMe_Blog Alpha 1.062]]></copyright>
<webMaster><![CDATA[389961817@qq.com]]></webMaster>
<generator><![CDATA[2010-03-10]]></generator>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_3_474.html]]></link>
<title><![CDATA[“按位相与”对“布尔逻辑”造成的误差  - “&amp;”运算符]]></title>
<author>claymore</author>
<category><![CDATA[ 运算符 &amp; 布尔 ]]></category>
<pubDate>2010-03-10</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_3_474.html]]></guid>
<description><![CDATA[<div>在表示判断的过程中我们常使用&ldquo;&amp;&rdquo;表示逻辑与，可能是由于其他语言如C系程序语言工具而来的，但是很有可能造成严重的错误。<br />
<br />
比如，在位运算中&ldquo;&amp;&rdquo;表示按位与，二者便造成了冲突。<br />
<br />
在PHP中，逻辑与的正确运算符应该是&ldquo;&nbsp;and &rdquo;而不是&ldquo;&amp;&rdquo;。<br />
<br />
请正确使用。<br />
<br />
<br />
注意一些的逻辑表达<br />
<br />
<span style="color: #ff0000">1&amp;64 为假(0000001&amp;1000000=0)<br />
1 and 64 为真</span></div>]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_1_473.html]]></link>
<title><![CDATA[最近比较忙···累]]></title>
<author>claymore</author>
<category><![CDATA[ ]]></category>
<pubDate>2010-03-07</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_1_473.html]]></guid>
<description><![CDATA[其实什么也没做，其实有很多要做，就是因为他多了，忙不过来干脆偷懒什么也不想做。<br />
<br />
点击那边的事：<br />
一些程序需要完善，一些隐性的BUG需要解决，新的站点需要写成，服务器应该在我走之前你得到很好的优化和配置。<br />
但是，我不想做。<br />
<br />
<br />
自己这边的事：<br />
13号去广州，去了那边又是一大堆麻烦的事。<br />
现在自己的一些程序需要完善和升级，更好的思路就会产生新的解决问题的方案，就会多花时间来处理。<br />
BLOG程序新的思路已经有了，升级了20%，觉得在13号之前没可能完成，就没写了。<br />
不过如果心情好的话会继续做的。<br />
还有毕业设计什么的一边工作一边做，也很繁忙的，杂七杂八的。<br />
最近处理在学校的事，又是嫌麻烦。<br />
<br />
我这个人啊，最讨厌麻烦的事情，没那么多的精力一一做好。]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_1_472.html]]></link>
<title><![CDATA[2010.02.08 焦躁的内心]]></title>
<author>claymore</author>
<category><![CDATA[ 焦躁 烦 忙 懒 妈的什么也不想做 ]]></category>
<pubDate>2010-02-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_1_472.html]]></guid>
<description><![CDATA[好久没有写日记了，原因有很多，比如是忙啊什么的理由。不过呢，主要的还是这个程序需要做很大的修改，没什么心情写。<br />
<br />
以前比较喜欢写日记，喜欢经常对自己所做过的事情进行总结，不过呢，现在很少这样了，我也想经常这样，总结一下。<br />
<br />
<br />
<br />
话说对PhpMe_Blog进行改版啊，还真是麻烦，相当于把整个程序从新写一遍，不过呢，这个程序是我最喜欢的程序了，一直对它不停地修改和改进，所以我希望它能非常完美，所以改版我会做的，就算再麻烦，由于麻烦呢，放假之后一直都没有做，等待以后找个非常好的时间以及非常好的心情就做吧。<br />
<br />
现在这个Blog程序其实已经很好了，不过有一些毛病，比如表设计上、程序结构设计上有一些毛病，特别是还没有做index，所以当数据量大的时候访问会变慢，不过呢，现在还看不出来赫赫。<br />
<br />
<br />
<br />
话说最近这些空闲时间呢一直都闲着，什么也不想做其实应该做的事情有很多，比如点击的服务器需要做调整，一些程序应该再完善一下，我想我下学期没有时间做这种事情了。<br />
<br />
<br />
该死的补考，下学期开学还得再学校待2个周才能去广州工作，因为补考啊，有门选修课挂掉了，郁闷呢，那个老师怎么挂我的科呢，都大四了，害的我这么麻烦，原本的时间计划都混乱了，真是&middot;&middot;&middot;巴嘎！！]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_6_471.html]]></link>
<title><![CDATA[Jquery Tabs: spinner option not working?]]></title>
<author>claymore</author>
<category><![CDATA[ Jquery Tabs spinner ]]></category>
<pubDate>2010-01-10</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_6_471.html]]></guid>
<description><![CDATA[<span style="font-size: large;">I need an ajax animation while the remote page is loaded in tabs.<br />
I am using<br />
<br />
$('#tabs2').tabs({ spinner: ''&lt;img src=&quot;../../Content/images/Jquery/spinner.gi'' });<br />
<br />
Even $('#tabs2').tabs({ spinner: 'Loading..' }); also doesn't works ...<br />
<br />
Though the tab functionality is working but the animation is not working ...<br />
I am using JQuery theme roller files. Your help is much appreciated. Many Thanks</span><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Problem solved. I Put a &lt;span&gt; tag in the tabs. Found the solution in Jquery support discussions. <a href="http://docs.jquery.com/Discussion" target="_blank">http://docs.jquery.com/Discussion</a><br />
<br />
e.g.<br />
<br />
<span style="font-size: large;">&lt;li&gt;&lt;a href=&quot;../URL&quot;&gt;**&lt;span&gt;Text to display in Tabs&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;tabdiv&quot;&gt;**&lt;span&gt;Text to display in Tabs&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;</span><br />
<br />
<br />
<br />
<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_108_470.html]]></link>
<title><![CDATA[HTTP头部详解及使用Java套接字处理HTTP请求]]></title>
<author>claymore</author>
<category><![CDATA[ ]]></category>
<pubDate>2009-12-01</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_108_470.html]]></guid>
<description><![CDATA[<div>进行Web开发关键是要了解超文本传输协议（HTTP），该协议用来传输网页、图像以及因特 网上在浏览器与服务器间传输的其他类型文件。只要你在浏览器上输入一个URL，最前面的http://就表示使用HTTP来访问指定位置的信息。（大部分 浏览器还支持其他一些不同的协议，其中FTP就是一个典型例子。）</div>
<div>本文从HTTP协议的结构上初步探讨HTTP协议的工作原理和请求响应格式,并最后通过一个使用Java编写的小HTTP服务器验证了如何处理和响应HTTP请求</div>
<div>HTTP由两部分组成：请求和响应。当你在Web浏览器中输入一个URL时，浏览器将根据你 的要求创建并发送请求，该请求包含所输入的URL以及一些与浏览器本身相关的信息。当服务器收到这个请求时将返回一个响应，该响应包括与该请求相关的信息 以及位于指定URL（如果有的话）的数据。直到浏览器解析该响应并显示出网页（或其他资源）为止。<br />
<br />
&nbsp;</div>
<div><strong>HTTP请求</strong></div>
<div>HTTP请求的格式如下所示：</div>
<div>＜request-line＞</div>
<div>＜headers＞</div>
<div>＜blank line＞</div>
<div>[＜request-body＞]</div>
<div>在HTTP请求中，第一行必须是一个请求行（request line），用来说明请求类型、要访问的资源以及使用的HTTP版本。紧接着是一个首部（header）小节，用来说明服务器要使用的附加信息。在首部之 后是一个空行，再此之后可以添加任意的其他数据[称之为主体（body）]。</div>
]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_84_469.html]]></link>
<title><![CDATA[经典恶搞]]></title>
<author>claymore</author>
<category><![CDATA[ ]]></category>
<pubDate>2009-11-25</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_84_469.html]]></guid>
<description><![CDATA[1 ：我自横刀向天笑，笑完我就去睡觉。 <br />
2 ：收银员说：没零钱了，找你两个塑料袋吧！ <br />
3 ：我的优点是：我很帅；但是我的缺点是：我帅的不明显。 <br />
4 ：什么是幸福？幸福就是猫吃鱼，狗吃肉，奥特曼打小怪兽！ <br />
5 ：我的人生有A 面也有B面，你的人生有S面也有B面。 <br />
6 ：我是胖人，不是粗人。 <br />
7 ：台湾一日不收复，我一日不过4级！ <br />
8 ：如果太阳不出来了，我就不去上班了；如果出来了，我就继续睡觉！ <br />
9 ：狂奔的蜗牛。 <br />
10 ：泡妞就像挂QQ，每天哄她2个小时，很快就可以太阳了。  <br />
11 ：谈钱不伤感情，谈感情最他妈伤钱。 <br />
12 ：我诅咒你一辈子买方便面没有调料包。 <br />
13 ：会计说：&ldquo;你晚点来领工资吧，我这没零钱。&rdquo; <br />
14 ：你看得出我擦了粉吗？ <br />
15 ：虽然你身上喷了古龙水，但我还是能隐约闻到一股人渣味儿。 <br />
16 ：我的名字叫Rain，小名叫润土。 <br />
17 ：我是天使，回不去天堂是因为体重的原因。 <br />
18 ：有一次我上街，一群女孩把我拦住，她们说我帅，我不承认，她们就打我，还说我虚伪。 <br />
19 ：既宅又腐，前途未卜。 <br />
20 ：冲杯三鹿给党喝。 <br />
21 ：史上最神秘的部门：有关部门。 <br />
22 ：不可否认，马赛克是这个世纪阻碍人类裸体艺术进步最大的障碍！ ]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_3_468.html]]></link>
<title><![CDATA[PHP和Socket简介]]></title>
<author>claymore</author>
<category><![CDATA[ Socket ]]></category>
<pubDate>2009-11-23</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_3_468.html]]></guid>
<description><![CDATA[章: PHP And Socket<br />
书名: 《PHP Game Programming》<br />
作者: Matt Rutledget<br />
翻译: heiyeluren &lt;heiyeluren_gmail_com&gt;<br />
<br />
◇　Socket基础<br />
◇　产生一个服务器<br />
◇　产生一个客户端<br />
<br />
在这一章里你将了解到迷人而又让人容易糊涂的套接字（Sockets）。Sockets在PHP中是没有充分利用的功能。今天你将看到产生一个能使用客户端连接的服务器，并在客户端使用socket进行连接，服务器端将详细的处理信息发送给客户端。<br />
当你看到完整的socket过程，那么你将会在以后的程序开发中使用它。这个服务器是一个能让你连接的HTTP服务器，客户端是一个Web浏览器，这是一个单一的 客户端/服务器 的关系。<br />
<br />
<br />
<br />
◆　Socket 基础<br />
<br />
<br />
PHP 使用Berkley的socket库来创建它的连接。你可以知道socket只不过是一个数据结构。你使用这个socket数据结构去开始一个客户端和服务器之间的会话。这个服务器是一直在监听准备产生一个新的会话。当一个客户端连接服务器，它就打开服务器正在进行监听的一个端口进行会话。这时，服务器端接受客户端的连接请求，那么就进行一次循环。现在这个客户端就能够发送信息到服务器，服务器也能发送信息给客户端。<br />
产生一个Socket，你需要三个变量：一个协议、一个socket类型和一个公共协议类型。产生一个socket有三种协议供选择，继续看下面的内容来获取详细的协议内容。]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_3_467.html]]></link>
<title><![CDATA[PHP实现HTML转UBB]]></title>
<author>claymore</author>
<category><![CDATA[ HTML UBB ]]></category>
<pubDate>2009-11-22</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_3_467.html]]></guid>
<description><![CDATA[/**<br />
* 解析HTML为UBB函数<br />
*<br />
* @param string $str 要解析的字符串<br />
* @return string<br />
*/<br />
function parse($str)<br />
{<br />
$str = str_replace(&quot;\n&quot;,'',$str);<br />
$str = preg_replace(&quot;/\&lt;A[^&gt;]+HREF=\&quot;([^\&quot;]+)\&quot;[^&gt;]*\&gt;(.*?)&lt;\/a\&gt;/i&quot;,&quot;[url=$1]$2[/url]&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;font(.*?)color=\&quot;#([^ &gt;]+)\&quot;(.*?)\&gt;(.*?)&lt;\/font&gt;/i&quot;,&quot;&lt;font$1$3&gt;[color=$2]$4[/color]&lt;/font&gt;&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;font(.*?)face=\&quot;([^ &gt;]+)\&quot;(.*?)\&gt;(.*?)&lt;\/font&gt;/i&quot;,&quot;&lt;font$1$3&gt;[face=$2]$4[/face]&lt;/font&gt;&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;font(.*?)size=\&quot;([^ &gt;]+)\&quot;(.*?)\&gt;(.*?)&lt;\/font&gt;/i&quot;,&quot;[size=$2]$4[/size]&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;img[^&gt;]+src=\&quot;([^\&quot;]+)\&quot;[^&gt;]*\&gt;/i&quot;,&quot;[img]$1[/img]&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;DIV[^&gt;]+ALIGN=\&quot;([^\&quot;]+)\&quot;[^&gt;]*\&gt;(.*?)&lt;\/DIV\&gt;/i&quot;,&quot;[align=$1]$2[/align]&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;([\/]?)u\&gt;/i&quot;,&quot;[$1u]&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;([\/]?)em\&gt;/i&quot;,&quot;[$1I]&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;([\/]?)strong\&gt;/i&quot;,&quot;[$1b]&quot;,$str);<br />
$str = preg_replace(&quot;/\&lt;([\/]?)b(.*?)\&gt;/i&quot;,&quot;[$1b]&quot;,$str);]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_7_466.html]]></link>
<title><![CDATA[父窗口和子窗口相互调用其内定义的Javascript函数]]></title>
<author>claymore</author>
<category><![CDATA[ 父窗口 子窗口 ]]></category>
<pubDate>2009-10-25</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_7_466.html]]></guid>
<description><![CDATA[你可以在子窗口中用 parent.alert(1); 测试一下子窗口调用父窗口函数的效果，<br />
也可以 document.getElementById('childwindow').contentWindow.alert(1); 测试下父窗口调用子窗口函数的效果。<br />
<br />
特别是子窗口可以通过这样关闭父窗口的层。效果不错。<br />
<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_46_465.html]]></link>
<title><![CDATA[MySQL select in 排序问题]]></title>
<author>claymore</author>
<category><![CDATA[ 排序 ]]></category>
<pubDate>2009-10-09</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_46_465.html]]></guid>
<description><![CDATA[表结构如下:<br />
mysql&gt; select * from test;<br />
+----+-------+<br />
| id | name |<br />
+----+-------+<br />
| 1 | test1 |<br />
| 2 | test2 |<br />
| 3 | test3 |<br />
| 4 | test4 |<br />
| 5 | test5 |<br />
+----+-------+<br />
<br />
执行以下SQL:<br />
mysql&gt; select * from test where id in(3,1,5);<br />
+----+-------+<br />
| id | name |<br />
+----+-------+<br />
| 1 | test1 |<br />
| 3 | test3 |<br />
| 5 | test5 |<br />
+----+-------+<br />
3 rows in set (0.00 sec)<br />
<br />
这个select在mysql中得结果会自动按照id升序排列,<br />
但是我想执行&quot;select * from test where id in(3,1,5);&quot;的结果按照in中得条件排序,即:3,1,5,<br />
<br />
想得到的结果如下:<br />
id name<br />
3 test3<br />
1 test1<br />
5 test5<br />
<br />
请问在这样的SQL在Mysql中怎么写?<br />
网上查到sqlserver中可以用order by charindex解决,但是没看到Mysql怎么解决??请高手帮忙,谢<br />
<br />
谢!<br />
<br />
select * from a order by substring_index('3,1,2',id,1);<br />
<br />
试下这个good,ls正解。<br />
<br />
<br />
order by find_in_set(id,'3,1,5')<br />
<br />
谢谢,经测试order by substring_index和order by find_in_set都可以<br />
<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_6_464.html]]></link>
<title><![CDATA[Javascript跨域和Ajax跨域解决方案]]></title>
<author>claymore</author>
<category><![CDATA[ Ajax 跨域 ]]></category>
<pubDate>2009-09-30</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_6_464.html]]></guid>
<description><![CDATA[1.什么引起了ajax跨域不能的问题<br />
ajax本身实际上是通过XMLHttpRequest对象来进行数据的交互，而浏览器出于安全考虑，不允许js代码进行跨域操作，所以会警告。<br />
<br />
2.有什么完美的解决方案么？<br />
没有。解决方案有不少，但是只能是根据自己的实际情况来选择。<br />
<br />
具体情况有:<br />
一、本域和子域的相互访问: www.aa.com和book.aa.com<br />
二、本域和其他域的相互访问: www.aa.com和www.bb.com 用 iframe<br />
三、本域和其他域的相互访问: www.aa.com和www.bb.com 用 XMLHttpRequest访问代理<br />
四、本域和其他域的相互访问: www.aa.com和www.bb.com 用 JS创建动态脚本<br />
<br />
<br />
解决方法：<br />
一、如果想做到数据的交互，那么www.aa.com和book.aa.com必须由你来开发才可以。可以将book.aa.com用iframe添加到 www.aa.com的某个页面下,在www.aa.com和iframe里面都加上document.domain = &quot;aa.com&quot;，这样就可以统一域了，可以实现跨域访问。就和平时同一个域中镶嵌iframe一样，直接调用里面的JS就可以了。(这个办法我没有尝试，不过理论可行)<br />
<br />
<br />
二、当两个域不同时,如果想相互调用，那么同样需要两个域都是由你来开发才可以。用iframe可以实现数据的互相调用。解决方案就是用 window.location对象的hash属性。hash属性就是http://domian/web/a.htm#dshakjdhsjka 里面的#dshakjdhsjka。利用JS改变hash值网页不会刷新，可以这样实现通过JS访问hash值来做到通信。不过除了IE之外其他大部分浏览器只要改变hash就会记录历史，你在前进和后退时就需要处理，非常麻烦。不过再做简单的处理时还是可以用的，具体的代码我再下面有下载。大体的过程是页面a和页面b在不同域下,b通过iframe添加到a里，a通过JS修改iframe的hash值，b里面做一个监听(因为JS只能修改hash，数据是否改变只能由b自己来判断)，检测到b的hash值被修改了，得到修改的值，经过处理返回a需要的值，再来修改a的hash值(这个地方要注意，如果a 本身是那种查询页面的话比如http://domian/web/a.aspx?id=3,在b中直接parent.window.location是无法取得数据的，同样报没有权限的错误，需要a把这个传过来，所以也比较麻烦)，同样a里面也要做监听，如果hash变化的话就取得返回的数据，再做相应的处理。]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_46_463.html]]></link>
<title><![CDATA[Linux下MySQL configure参数]]></title>
<author>claymore</author>
<category><![CDATA[ Linux configure ]]></category>
<pubDate>2009-09-26</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_46_463.html]]></guid>
<description><![CDATA[--prefix=/program/mysql     安装路径<br />
<br />
--localstatedir=/var/lib/mysql    数据库文件存放路径<br />
<br />
--with-comment=Source   <br />
<br />
--with-server-suffix=-Community<br />
<br />
--with-mysqld-user=mysql<br />
<br />
--without-debug<br />
<br />
--with-big-tables<br />
<br />
--with-charset=gbk  utf8<br />
<br />
--with-collation=gbk_chinese_ci   utf8_unicode_ci<br />
<br />
--with-extra-charsets=all<br />
<br />
--with-pthread<br />
<br />
--enable-static<br />
<br />
--enable-thread-safe-client<br />
<br />
--with-client-ldflags=-all-static<br />
<br />
--with-mysqld-ldflags=-all-static<br />
<br />
--enable-assembler<br />
<br />
--without-innodb<br />
<br />
--without-isam<br />
<br />
--without-ndb-debug<br />
<br />
--with-unix-socket-path=/home/mysql/tmp/mysql.sock<br />
<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_14_462.html]]></link>
<title><![CDATA[Linux下的Apache缓存系统]]></title>
<author>claymore</author>
<category><![CDATA[ Linux Apache 缓存 ]]></category>
<pubDate>2009-09-26</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_14_462.html]]></guid>
<description><![CDATA[Apache 从2.0开始就已经可以使用缓存模块了，不过在2.0的时候还是实验性的，到了2.2已经完全可以放心的使用。Apache 的缓存实现主要依靠 mod_cache、mod_disk_cache、mod_file_cache 及 mod_mem_cache。只需在配置编译的时候加上参数：&ndash;enable-cache、 &ndash;enable-disk-cache、&ndash;enable-file-cache、 &ndash;enable-mem-cache 即可。<br />
关于 Apache 的编译安装本文就不再说了，可以参考以前的文章。这里主要介绍一下如何配置使用 Apache 的缓存功能。<br />
具体来说，Apache 的缓存方式有两种，一种是基于硬盘文件的缓存，由 mod_disk_cache 实现，另一种是使用内存缓存，由 mod_mem_cache 实现，不过它们都是依赖 mod_cache 模块的，mod_cache 模块提供了一些缓存配置的指令供它们使用，而 mod_file_cache 模块是搭配 mod_mem_cache 模块使用的，下面分别进行介绍。<br />
<br />
<br />
1、基于硬盘文件的缓存<br />
基于硬盘文件存储的缓存由 mod_disk_cache 模块实现，先看个简单的配置例子：<br />
<br />
CacheDefaultExpire 86400<br />
<br />
CacheEnable disk /<br />
CacheRoot /tmp/apacheCache<br />
CacheDirLevels 5<br />
CacheDirLength 5<br />
CacheMaxFileSize 1048576<br />
CacheMinFileSize 10<br />
<br />
<br />
把上面的配置加到 Apache 的 httpd.conf 文件中，如果缓存相关的模块都已经编译进了 Apache 的核心，则无需加载模块，直接就能使用上面的指令。指令的详细说明如下：]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_15_461.html]]></link>
<title><![CDATA[Cannot initialize zend_mm storage [win32]]]></title>
<author>claymore</author>
<category><![CDATA[ Apache ]]></category>
<pubDate>2009-09-25</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_15_461.html]]></guid>
<description><![CDATA[Basically it means that you have exhausted every available thread and PHP can not start a new one. I recommend running PHP as CGI, application/x-httpd-php &ldquo;/php/php.exe&rdquo;, instead of using php5_module &ldquo;/php/sapi/php5apache2.dll&rdquo; to solve that problem. As a side note the win32 version of Apache can only handle a maximum pool of 600 threads, anything over that the threads get held in a wait proccess, no matter what ThreadLimit or Threadsperchild is set to. Yes the thread get assigned, but it not executed until the current working thread limit falls back below 600! Apache running under Win(64) or running under any version of Linux does not have those limitations.<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_3_460.html]]></link>
<title><![CDATA[关于Unable to load dynamic library './php_mssql.dll' 类似错误]]></title>
<author>claymore</author>
<category><![CDATA[ ]]></category>
<pubDate>2009-09-25</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_3_460.html]]></guid>
<description><![CDATA[<div>APACHE错误日志:<br />
<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_oci8.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_pdo_oci.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_pdo_oci8.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_pdo_pgsql.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_pdo_sqlite_external.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_pgsql.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_pspell.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0<br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP\\ext\\php_sybase_ct.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0</div>]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_3_459.html]]></link>
<title><![CDATA[ZendOptimizer配置指南 ]]></title>
<author>claymore</author>
<category><![CDATA[ ZendOptimizer 配置 优化 ]]></category>
<pubDate>2009-09-23</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_3_459.html]]></guid>
<description><![CDATA[Zend Optimizer是由PHP核心引擎&ldquo;Zend&rdquo;创建者Zend技术公司所开的免费PHP优化软件。据Zend公司透露使用这个软件某些情况下至少可以提高性能30%以上！这么好的免费大餐当然要用，现在我们来谈谈如何配置这套软件。<br />
<br />
Zend Opt的安装是傻瓜化的，安装向导会自动根据你的选择来修改php.ini帮助你启动这个引擎。下面我们来介绍下Zend Opt的配置选项，帮助你最大化自定义合理的配置。下边是我所用的配置文件，看不懂也不要着急，看完本文你就会完全明白。<br />
<br />
[Zend]<br />
zend_optimizer.optimization_level=1023<br />
zend_optimizer.encoder_loader=0<br />
zend_extension_ts=&quot;C:\Program Files\Zend\lib\ZendOptimizer.dll&quot;<br />
<br />
现在我们来介绍下上边这个配置文件的含义：<br />
zend_optimizer.optimization_level 《== 优化程度，这里定义启动多少个优化过程。<br />
zend_optimizer.encoder_loader 《== 是否允许处理由Zend Encoder加密的PHP文件。<br />
zend_extension_ts 《== 优化器所在目录。<br />
<br />
优化过程 zend_optimizer.optimization_level 详细解释<br />
<br />
这里最为重点的部分，仔细看！Zend Opt总共有10个优化过程，从理论上说开的越多性能越好。当然，理论和实际永远都存在着差距。优化过程开启的越多对性能消耗也相对也越大，Zend Opt的10个优化过程并不相同也就是说效果不是平均的。Zend公司定义的最高值(High模式)为15，这里15指的是开启1-4号优化过程。当然，很多朋友并不满足于此，毕竟最高也只开启4个优化过程连总数的一半都没有。各个优化过程的对应的数字代码（值）如下：]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_46_458.html]]></link>
<title><![CDATA[Table 'xxxx' is marked as crashed...]]></title>
<author>claymore</author>
<category><![CDATA[ crashed ]]></category>
<pubDate>2009-09-16</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_46_458.html]]></guid>
<description><![CDATA[今天VODCMS的管理员反映无法登陆后台，我想可能是Apache或者数据库又出错了。<br />
<br />
重启了下Apache，正如所料想的一样，问题依旧。<br />
<br />
查看了一下数据库的表，发现有个表出错了，修复不能！<br />
<br />
Table 	Op 	Msg_type 	Msg_text<br />
vodcms.vodcms_members 	optimize 	Error 	Table '.\vodcms\vodcms_members' is marked as crash...<br />
vodcms.vodcms_members 	optimize 	Error 	Table 'vodcms_members' is marked as crashed and la...<br />
vodcms.vodcms_members 	optimize 	error 	Corrupt<br />
<br />
<br />
网上搜了搜，发现这个错误很严重，数据基本上没有了，不管用MySQL提供的修复工具还是PhpMyAdmin都修复不能，查看了下data文件夹，发现少了个*.MYD文件。<br />
<br />
所以呢，从新从网上下了个VODCMS5.0将错误的表重新创建，数据重新导入，<br />
<br />
<br />
要是错误出在其他的重要的数据表上的话问题可就严重了。<br />
<br />
记得前些时候BBS的post表也出过错，不过能修复好，要是出现这样的错误可就严重了。<br />
<br />
<br />
所以以后记得要随时备份数据库。<br />
<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_46_457.html]]></link>
<title><![CDATA[MySQL中把一个查询结果插入到另外一个表中 ]]></title>
<author>claymore</author>
<category><![CDATA[ mysql insert select ]]></category>
<pubDate>2009-09-16</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_46_457.html]]></guid>
<description><![CDATA[insert into best_quote( quote_id, product_id, quote_type, quote_price, quote_amount, quote_time, company_id )<br />
select quote_id, product_id, quote_type, quote_price, quote_amount, quote_time, company_id<br />
from quote<br />
where product_id = 4<br />
and quote_type = 1; <br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_15_456.html]]></link>
<title><![CDATA[关于LAMP的优化]]></title>
<author>claymore</author>
<category><![CDATA[ LAMP 优化 ]]></category>
<pubDate>2009-09-13</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_15_456.html]]></guid>
<description><![CDATA[<div><span style="font-family: Arial">Linux、Apache、MySQL 和 PHP（或 Perl）是许多 Web 应用程序的 LAMP 架构的基础。有很多基于 LAMP 组件的开源软件包可用于解决各种各样的问题。随着应用程序负载的增加，底层基础设施的瓶颈也会越来越明显，其表现形式就是响应用户请求的速度变慢。 <br />
<br />
</span><a name="N10064" target="_blank"><span style="font-family: Arial">调优 Apache </span></a></div>
<div><span style="font-family: Arial">Apache 是一种高度可配置的软件。它具有大量特性，但每一种都代价高昂。从某种程度上来说，调优 Apache 来说就是以恰当的方式分配资源，还涉及到将配置简化为仅包含必要内容。<br />
<br />
</span></div>
<div><a name="N1006E" target="_blank"><span style="font-family: Arial">配置 MPM</span></a></div>
<div><span style="font-family: Arial">Apache 是模块化的，因为可以轻松添加和移除特性。在 Apache 的核心，多处理模块（Multi-Processing Module，MPM）提供了这种模块化功能性 &mdash;&mdash; 管理网络连接、调度请求。MPM 使您能够使用线程，甚至能够将 Apache 迁移到另外一个操作系统。 </span></div>
<div><span style="font-family: Arial">每次只能有一个 MPM 是活动的，必须使用 <code>--with-mpm=<i>(worker|prefork|event)</i> </code>静态编译。</span></div>
<div><span style="font-family: Arial">每个请求使用一个进程的传统模型称为 <i>prefork</i>。较新的线程化模型称为 <i>worker</i>，它使用多个进程，每个进程又有多个线程，这样就能以较低的开销获得更好的性能。最新的 <i>event</i> MPM 是一种实验性的模型，为不同的任务使用单独的线程池。要确定当前使用的是哪种 MPM，可执行 <code>httpd -l</code>。</span></div>
]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_15_455.html]]></link>
<title><![CDATA[Windows NT系统下的Apache性能优化]]></title>
<author>claymore</author>
<category><![CDATA[ Apache 优化 ]]></category>
<pubDate>2009-09-13</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_15_455.html]]></guid>
<description><![CDATA[一般来说，WinNT系统下使用IIS，而Apache在Linux下应用的比较多，但是依然有很多人在WinNT系统下使用Apache而非IIS，可能是基于对Windows系统的熟悉吧。今天就来说一下在Windows系统下如果优化Apache的性能。<br />
<br />
mpm_winnt.c是专门针对Windows NT优化的MPM(多路处理模块)，它使用一个单独的父进程产生一个单独的子进程，在这个子进程中轮流产生多个线程来处理请求。也就是说 mpm_winnt只能启动父子两个进程, 不能像Linux下那样同时启动多个进程。<br />
<br />
mpm_winnt主要通过ThreadsPerChild和MaxRequestsPerChild两个参数来优化Apache，下面详细来说明一下。<br />
<br />
ThreadsPerChild<br />
这个参数用于设置每个进程的线程数, 子进程在启动时建立这些线程后就不再建立新的线程了. 一方面因为mpm_winnt不能启动多个进程, 所以这个数值要足够大，以便可以处理可能的请求高峰; 另一方面该参数以服务器的响应速度为准的, 数目太大的反而会变慢。因此需要综合均衡一个合理的数值。<br />
<br />
mpm_winnt上的默认值是64, 最大值是1920. 这里建议设置为100-500之间，服务器性能高的话值大一些，反之值小一些。<br />
<br />
MaxRequestsPerChild<br />
该参数表示每个子进程能够处理的最大请求数, 即同时间内子进程数目.设置为零表示不限制, mpm_winnt上的默认值就是0.]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_46_454.html]]></link>
<title><![CDATA[Duplicate entry '' for key 1 的错误解决]]></title>
<author>claymore</author>
<category><![CDATA[ ]]></category>
<pubDate>2009-09-11</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_46_454.html]]></guid>
<description><![CDATA[今天学校BBS抽风，刚Apache出了小问题解决了，没过几分钟又出问题了，这下是无法回帖。<br />
<br />
用httpwatcher看看了，发现是数据库出错了，出现了 Duplicate entry 'xxxxxxxxxx' for key 1的错误，网上搜了搜，确定是表索引数据结构坏掉了，应该修复一下，使用MYSQL自带的myisamchk工具，MYSQL带的工具都很多并且比较实用，不过都是字符界面的。<br />
<br />
<br />
<img width="691" height="459" src="/userfiles/image/2009/09/11/fckeditor_20090911022852.png" alt="" /><br />
<br />
<br />
问题解决了。<br />
<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_14_453.html]]></link>
<title><![CDATA[Linux系统信息查看命令大全]]></title>
<author>claymore</author>
<category><![CDATA[ Linux 系统信息 命令 ]]></category>
<pubDate>2009-09-09</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_14_453.html]]></guid>
<description><![CDATA[<div><strong>系统</strong></div>
<pre>
# uname -a               # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue   # 查看操作系统版本
# cat /proc/cpuinfo      # 查看CPU信息
# hostname               # 查看计算机名
# lspci -tv              # 列出所有PCI设备
# lsusb -tv              # 列出所有USB设备
# lsmod                  # 列出加载的内核模块
# env                    # 查看环境变量</pre>
<div><strong>资源</strong></div>
<pre>
# free -m                # 查看内存使用量和交换区使用量
# df -h                  # 查看各分区使用情况
# du -sh &lt;目录名&gt;        # 查看指定目录的大小
# grep MemTotal /proc/meminfo   # 查看内存总量
# grep MemFree /proc/meminfo    # 查看空闲内存量
# uptime                 # 查看系统运行时间、用户数、负载
# cat /proc/loadavg      # 查看系统负载</pre>
<div><strong>磁盘和分区</strong></div>
<pre>
# mount | column -t      # 查看挂接的分区状态
# fdisk -l               # 查看所有分区
# swapon -s              # 查看所有交换分区
# hdparm -i /dev/hda     # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE       # 查看启动时IDE设备检测状况</pre>
<div><strong>网络</strong></div>
<pre>
# ifconfig               # 查看所有网络接口的属性
# iptables -L            # 查看防火墙设置
# route -n               # 查看路由表
# netstat -lntp          # 查看所有监听端口
# netstat -antp          # 查看所有已经建立的连接
# netstat -s             # 查看网络统计信息</pre>
]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_15_452.html]]></link>
<title><![CDATA[Apache配置文件httpd.conf]]></title>
<author>claymore</author>
<category><![CDATA[ Apache 配置 httpd.conf ]]></category>
<pubDate>2009-09-09</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_15_452.html]]></guid>
<description><![CDATA[<div><b><font size="5">原文说明</font></b></div>
<ul>
    <li>引自www.linuxsir.org</li>
    <li>原文地址：<a title="http://www.7880.com/Info/Article-3df0ef00.html" rel="nofollow" href="http://www.7880.com/Info/Article-3df0ef00.html" target="_blank">http://www.7880.com/Info/Article-3df0ef00.html</a></li>
</ul>
<div><b><font size="5"><br />
文件全局说明</font></b></div>
<div>基于 NCSA 服务的配置文件。这是Apache服务器主要配置文件。它包含服务器的影响服务器运行的配置指令。参见&lt;URL:<a title="http://httpd.ache.org/doc-2.0/" rel="nofollow" href="http://httpd.ache.org/doc-2.0/" target="_blank">http://httpd.ache.org/doc-2.0/</a>&gt;以取得关于这些指令的详细信息</div>
<div>不要只是简单的阅读这些指令信息而不去理解它。这里只是做了简单的说明，如果你没有参考在线文件，你就会被警告。</div>
<div>这些配置指令被分为下面三个部分： 1. 控制整个Apache服务器行为的部分(即全局环境变量) 2. 定义主要或者默认服务参数的指令，也为所有虚拟主机提供默认的设置参数 3. 虚拟主机的设置参数</div>
<div>配置和日志文件名：如果你指定的文件名以&ldquo;/&rdquo;开始(win32下以&ldquo;dirver:/&rdquo;)，服务器将使用绝对路径，如果文件名不是以&ldquo;/&rdquo;开始的，那么它将把ServerRoot 的值附加在文件名的前面，例如，对&ldquo;logs/foo.log&quot;，如果ServerRoot的值为&ldquo;/usr/local/apache2&rdquo;，则该文件应为&ldquo;/usr/local/apache2/logs/foo.log&rdquo;</div>
]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_14_451.html]]></link>
<title><![CDATA[Linux查看磁盘空间]]></title>
<author>claymore</author>
<category><![CDATA[ 磁盘空间 ]]></category>
<pubDate>2009-09-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_14_451.html]]></guid>
<description><![CDATA[<strong>一、df 命令</strong><br />
<br />
df 是来自于coreutils 软件包，系统安装时，就自带的；我们通过这个命令可以查看磁盘的使用情况以及文件系统被挂载的位置；<br />
<br />
举例：<br />
<br />
[root@localhost beinan]# df -lh<br />
<br />
Filesystem 容量 已用 可用 已用% 挂载点<br />
<br />
/dev/hda8 11G 6.0G 4.4G 58% /<br />
<br />
/dev/shm 236M 0 236M 0% /dev/shm<br />
<br />
/dev/sda1 56G 22G 35G 39% /mnt/sda1<br />
<br />
我们从中可以看到,系统安装在/dev/hda8 ；还有一个56G的磁盘分区/dev/sda1挂载在 /mnt/sda1中；<br />
<br />
其它的参数请参考 man df<br />
<br />
<br />
<br />
<strong>二、fdsik</strong><br />
<br />
fdisk 是一款强大的磁盘操作工具，来自util-linux软件包，我们在这里只说他如何查看磁盘分区表及分区结构；参数 -l ，通过-l 参数，能获得机器中所有的硬盘的分区情况；<br />
<br />
[root@localhost beinan]# fdisk -l<br />
<br />
Disk /dev/hda: 80.0 GB, 80026361856 bytes<br />
<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
<br />
Device Boot Start End Blocks Id System<br />
<br />
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS<br />
<br />
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)<br />
<br />
/dev/hda3 2806 7751 39728745 5 Extended<br />
<br />
/dev/hda5 2806 3825 8193118+ 83 Linux<br />
<br />
/dev/hda6 3826 5100 10241406 83 Linux]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_6_450.html]]></link>
<title><![CDATA[再次遇到Ajax数据提交问题 - &amp;]]></title>
<author>claymore</author>
<category><![CDATA[ Ajax 问题 解决 ]]></category>
<pubDate>2009-09-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_6_450.html]]></guid>
<description><![CDATA[以前自己写AJAX程序池的时候也遇到过,然后使用JQUERY后以为它内部会处理这种显而易见的问题,结果没有,今天才发现还得自己处理。<br />
<br />
这个问题就是当提交的数据中包含特殊的字符如'&amp;'时，数据就会被截断。<br />
<br />
这里必须要使用encodeURIComponent对数据进行编码，后台脚本接收到的数据才会是完整的！<br />
<br />
<br />
var form=$(&quot;#music_add_form&quot;);<br />
var elements = form.find('input[type=text],input[type=hidden],input[checked],select');<br />
var post_data='';<br />
elements.each(function(){<br />
post_data+=&quot;&amp;&quot;+$(this).attr('name')+&quot;=&quot;+encodeURIComponent($(this).val());<br />
});]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_14_449.html]]></link>
<title><![CDATA[proftpd-1.3安装配置]]></title>
<author>claymore</author>
<category><![CDATA[ proftpd ]]></category>
<pubDate>2009-09-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_14_449.html]]></guid>
<description><![CDATA[<div id="zoomtext">
<div>安装环境：<br />
操作系统centos-5.2<br />
mysql 5.0.67 源代码安装在/usr/local/mysql目录</div>
<div>1、proftpd-1.3.1源代码编译安装<br />
<br />
./configure --prefix=/usr/local/proftpd \<br />
--with-modules=mod_sql:mod_sql_mysql \ #支持mysql数据库<br />
--with-modules=mod_quotatab:mod_quotatab_sql \ #支持磁盘配额<br />
--with-modules=mod_tls \ #支持SSL/TLS安全传输<br />
--with-includes=/usr/local/mysql/include \<br />
--with-libraries=/usr/local/mysql/lib<br />
make <br />
make install<br />
<br />
cp sample-configurations/mod_sql.conf /usr/local/proftpd/etc/proftpd.conf<br />
<br />
2、proftpd.conf文件配置基本格式：<br />
<br />
#全局设置<br />
设置项目1 参数1<br />
设置项目2 参数2<br />
&hellip;&hellip;<br />
&hellip;&hellip;<br />
#某个目录的设置<br />
&lt;Directory &quot;路径名&quot;&gt;<br />
&hellip;&hellip;<br />
&hellip;&hellip;<br />
&lt;/Directory&gt;<br />
#关于匿名用户的设置<br />
&lt;Anonymous &quot;匿名登录的目录&quot;&gt;<br />
&hellip;&hellip;<br />
&hellip;&hellip;<br />
&lt;Limit 限制动作&gt;<br />
&hellip;&hellip;<br />
&hellip;&hellip;<br />
&lt;/Limit&gt;<br />
&lt;/Anonymous&gt;<br />
<br />
3、proftpd.conf配置文件中的一些基本配置：<br />
<br />
ServerName 服务器名称<br />
ServerType 服务器工作类型(standalone/inted)<br />
DefaultServer 是否启用虚拟FTP (on/off)<br />
Port 运行端口<br />
Umask 默认文件权限(022)<br />
User 运行proftpd服务器的用户<br />
Group 运行proftpd服务器的用户组<br />
AllowOverwrite 是否允许客户端覆盖文件(安全上一般设置为off)<br />
RequireValidShell 用户shell不在/etc/shells文件中，默认不允许登陆(on/off)<br />
MaxInstances 20 最多有20个proftpd的PID<br />
MaxClients 10 最多允许10个用户在线<br />
MaxClientsPerHost 1 一个IP只允许一个帐号连接<br />
MaxClientsPerUser 2 每个帐号在每个客户端最多同时登陆2次，可防止多线程下载软件<br />
DisplayLogin welcome.msg ftp登陆欢迎信息文件<br />
&lt;Directory /*&gt; 登入时想进入的目录位置(/* 为通配符)<br />
&lt;Anonymous ~ftp&gt; 匿名用户设置<br />
&lt;Global&gt; 所有虚拟ftp的共同设置项<br />
<br />
3.1 虚拟FTP设置<br />
&lt;VirtualHost 192.168.0.1&gt;<br />
ServerName &quot;&hellip;&hellip;&quot;<br />
&hellip;&hellip;<br />
&hellip;&hellip;<br />
&lt;/VitualHost&gt;<br />
<br />
3.2 开启ftp上传/下载的续传功能<br />
AllowStoreRestart on #上传<br />
AllowRetrieveRestart on #下载<br />
<br />
3.3 限速设置<br />
<br />
格式为： TransferRate STOR|RETR 速度(kbytes/s) user 使用者 <br />
STOR 为上传速度<br />
RETR 为下载速度<br />
后面不跟user的时候，针对全部用户进行限速<br />
<br />
3.4 让proftpd支持FXP传输<br />
AllowForeignAddress on<br />
PassivePorts 40000 40999 <br />
<br />
3.5 加快连接速度，关闭DNS反解<br />
UseReverseDNS off<br />
IdentLookups off<br />
<br />
3.6 只允许部分网段访问FTP<br />
&lt;Limit LOGIN&gt;<br />
Order allow,deny<br />
Allow from 10.10.<br />
Deny from all<br />
&lt;/Limit&gt;<br />
<br />
4、&lt;Limit&gt;参数说明</div>
</div>]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_1_448.html]]></link>
<title><![CDATA[2003应用程序错误事件487、3299]]></title>
<author>claymore</author>
<category><![CDATA[ ZendOptimizer Apache ]]></category>
<pubDate>2009-09-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_1_448.html]]></guid>
<description><![CDATA[最近学校的BBS每两天当一次，刚开始没注意，最近频繁了，仔细查看了下日志，今天早上出现了两个错误，一个是Zend Optimizer的487错误，一个是Apache的3299错误。<br />
<br />
事件 ID ( 487 )的描述(在资源( Zend Optimizer )中)无法找到。本地计算机可能没有必要的注册信息或消息 DLL 文件来从远程计算机显示消息。您可能可以使用 /AUXSOURCE= 标识来检索词描述；查看帮助和支持以了解详细信息。下列信息是事件的一部分: Unable to view file mapping, 试图访问无效的地址。<br />
<br />
在网上搜了搜，估计是目录的权限问题，于是做了以下操作，修改了C:\Windows\Temp的权限，允许Network Service进行读取和运行的权限；另外修改了php.ini，php.ini文件中设置upload_tmp_dir = &quot;C:\Windows\Temp\&quot;，原来这个upload_tmp_dir 是没有设置的，查看了一下php.ini，居然很多东西没有配置，估计是前任的师兄用的是phpStudy配套PHP配置环境，所以安装后都没进行什么配置，出问题也是难怪的。<br />
<br />
<br />
The Apache service named reported the following error:<br />
&gt;&gt;&gt; httpd.exe: Could not reliably determine the server's fully qualified domain name, using 202.115.144.85 for ServerName .<br />
<br />
有关更多信息，请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。<br />
<br />
这个是Apache错误3299的错误提示，这个错误在昨天给LINUX远程安装Apache的时候也遇到过，就是server name没有设置。于是打开httpd.conf设置 ServerName 202.115.144.81:80，这下问题应该解决了。另外查看了一下这个配置文件，发现还是一些地方没设置好，修改了监听端口为]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_14_447.html]]></link>
<title><![CDATA[RedHat5下Apache+MySQL+PHP的安装]]></title>
<author>claymore</author>
<category><![CDATA[ Linux Apache iptables ]]></category>
<pubDate>2009-09-07</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_14_447.html]]></guid>
<description><![CDATA[<span style="font-family: Arial;"><span style="font-size: large;"><span style="color: rgb(255, 0, 0);">1.Apache的安装</span></span></span><br />
<br />
今天帮点击音乐网写完了在LINUX下的资源采集,顺便安装了HTTP服务器,使用的是APACHE，不过安装过程还是挺郁闷的(通过winscp远程连接LINUX在终端下安装)。<br />
<br />
首先下载了一个*.tar.gz包，<br />
<br />
# tar -zxvf httpd-2.2.6.tar.gz<br />
<br />
# cd httpd-2.2.6/<br />
# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so<br />
<br />
//这里的&mdash;prefix指定apache的安装将安装到：/usr/local/apache目录下，--sysconfdir指定apache配置文件httpd.conf安装到：/etc/httpd目录下。（这两个路径可以自己任意指定指定，但是自己一定要在安装时记清楚，因为这个路径后面还要用到）<br />
<br />
另外一些模块的启用也应该在这里configure的时候指定，比如说 <br />
--enable-cache&nbsp; --enable-disk-cache&nbsp; --enable-file-cache&nbsp; --enable-mem-cache<br />
<br />
# make<br />
<br />
# make install<br />
<br />
如果不出意外的话，successful!<br />
<br />
启动运行apache:<br />
<br />
# /usr/local/apache/bin/apachectl start<br />
<br />
然后在本机浏览器里面输入：http://127.0.0.1，回车，默认会显示：it works字样，证明apache已经在工作状态中了。<br />
<br />
<br />
一般安装就上面的过程，不过在START的时候出现了个错误 Could not reliably determine the server's fully qualified domain name ，解决方法是只要把/conf/httpd.conf文件的#ServerName 前的#去掉就好了。 <br />
<br />
最后在start，没有问题，但是客户端还是无法访问，我想不是配置问题就是防火墙问题，首先检查是否是防火墙问题，的确是。<br />
<br />
/root$ ps<br />
PID TTY TIME CMD<br />
1 ? 00:00:00 init<br />
2 ? 00:00:00 migration/0<br />
3 ? 00:00:00 ksoftirqd/0<br />
4 ? 00:00:00 migration/1<br />
5 ? 00:00:00 ksoftirqd/1<br />
6 ? 00:00:00 migration/2<br />
7 ? 00:00:00 ksoftirqd/2<br />
8 ? 00:00:00 migration/3<br />
9 ? 00:00:00 ksoftirqd/3<br />
10 ? 00:00:00 events/0<br />
11 ? 00:00:00 events/1<br />
12 ? 00:00:00 events/2<br />
13 ? 00:00:00 events/3<br />
14 ? 00:00:00 khelper<br />
15 ? 00:00:00 kacpid<br />
50 ? 00:00:00 kblockd/0<br />
51 ? 00:00:00 kblockd/1<br />
52 ? 00:00:00 kblockd/2<br />
53 ? 00:00:00 kblockd/3<br />
63 ? 00:00:00 pdflush<br />
64 ? 00:00:00 pdflush<br />
66 ? 00:00:00 aio/0<br />
67 ? 00:00:00 aio/1<br />
68 ? 00:00:00 aio/2<br />
69 ? 00:00:00 aio/3<br />
54 ? 00:00:00 khubd<br />
65 ? 00:00:08 kswapd0<br />
142 ? 00:00:00 kseriod<br />
213 ? 00:00:00 scsi_eh_0<br />
229 ? 00:00:00 kjournald<br />
507 ? 00:00:00 minilogd<br />
1004 ? 00:00:00 udevd<br />
1325 ? 00:00:00 kauditd<br />
1423 ? 00:00:00 kmirrord<br />
1424 ? 00:00:00 kmir_mon<br />
1477 ? 00:00:00 kjournald<br />
1478 ? 00:00:00 kjournald<br />
1479 ? 00:00:00 kjournald<br />
1747 ? 00:00:00 sshd<br />
1776 ? 00:00:00 xinetd<br />
1794 ? 00:00:00 crond<br />
11728 ? 00:00:00 sshd<br />
29433 ? 00:00:00 httpd<br />
29470 ? 00:00:00 sshd<br />
29472 ? 00:00:00 sftp-server<br />
29490 ? 00:00:00 sshd<br />
29492 ? 00:00:00 bash<br />
29521 ? 00:00:00 ps<br />
/root$ ps<br />
PID TTY TIME CMD<br />
1 ? 00:00:00 init<br />
2 ? 00:00:00 migration/0<br />
3 ? 00:00:00 ksoftirqd/0<br />
4 ? 00:00:00 migration/1<br />
5 ? 00:00:00 ksoftirqd/1<br />
6 ? 00:00:00 migration/2<br />
7 ? 00:00:00 ksoftirqd/2<br />
8 ? 00:00:00 migration/3<br />
9 ? 00:00:00 ksoftirqd/3<br />
10 ? 00:00:00 events/0<br />
11 ? 00:00:00 events/1<br />
12 ? 00:00:00 events/2<br />
13 ? 00:00:00 events/3<br />
14 ? 00:00:00 khelper<br />
15 ? 00:00:00 kacpid<br />
50 ? 00:00:00 kblockd/0<br />
51 ? 00:00:00 kblockd/1<br />
52 ? 00:00:00 kblockd/2<br />
53 ? 00:00:00 kblockd/3<br />
63 ? 00:00:00 pdflush<br />
64 ? 00:00:00 pdflush<br />
66 ? 00:00:00 aio/0<br />
67 ? 00:00:00 aio/1<br />
68 ? 00:00:00 aio/2<br />
69 ? 00:00:00 aio/3<br />
54 ? 00:00:00 khubd<br />
65 ? 00:00:08 kswapd0<br />
142 ? 00:00:00 kseriod<br />
213 ? 00:00:00 scsi_eh_0<br />
229 ? 00:00:00 kjournald<br />
507 ? 00:00:00 minilogd<br />
1004 ? 00:00:00 udevd<br />
1325 ? 00:00:00 kauditd<br />
1423 ? 00:00:00 kmirrord<br />
1424 ? 00:00:00 kmir_mon<br />
1477 ? 00:00:00 kjournald<br />
1478 ? 00:00:00 kjournald<br />
1479 ? 00:00:00 kjournald<br />
1747 ? 00:00:00 sshd<br />
1776 ? 00:00:00 xinetd<br />
1794 ? 00:00:00 crond<br />
11728 ? 00:00:00 sshd<br />
29433 ? 00:00:00 httpd<br />
29470 ? 00:00:00 sshd<br />
29472 ? 00:00:00 sftp-server<br />
29490 ? 00:00:00 sshd<br />
29492 ? 00:00:00 bash<br />
29522 ? 00:00:00 ps<br />
/root$ setup<br />
TERM environment variable needs set.<br />
/root$ Firmware<br />
-bash: line 11: Firmware: command not found<br />
/root$ service iptables on<br />
Usage: /etc/init.d/iptables {start|stop|restart|condrestart|status|panic|save}<br />
/root$ service iptables off<br />
Usage: /etc/init.d/iptables {start|stop|restart|condrestart|status|panic|save}<br />
/root$ /etc/init.d/iptables stop<br />
Flushing firewall rules: [ OK ]<br />
Setting chains to policy ACCEPT: filter [ OK ]<br />
Unloading iptables modules: [ OK ]<br />
<br />
<br />
这样就OK了，客户端也能正常访问了。<br />
<br />
<br />
PS：<br />
<br />
<span style="color: rgb(255, 0, 0);">linux 下 apache启动、停止、重启命令</span><br />
基本的操作方法：<br />
本文假设你的apahce安装目录为/usr/local/apache2，这些方法适合任何情况<br />
<br />
apahce启动命令：<br />
推荐/usr/local/apache2/bin/apachectl start apaceh启动<br />
<br />
apache停止命令<br />
/usr/local/apache2/bin/apachectl stop 停止<br />
<br />
apache重新启动命令：<br />
/usr/local/apache2/bin/apachectl restart 重启<br />
<br />
要在重启 Apache 服务器时不中断当前的连接，则应运行：<br />
<br />
/usr/local/sbin/apachectl graceful<br />
<br />
如果apache安装成为linux的服务的话，可以用以下命令操作：<br />
<br />
service httpd start 启动<br />
<br />
service httpd restart 重新启动<br />
<br />
service httpd stop 停止服务 <br />
<br />
<br />
<br />
<span style="color: rgb(255, 0, 0);">如果你想一开机就让apache自动运行的话，那么进行如下操作：</span><br />
<br />
编辑etc/rc.d/rc.local<br />
<br />
# vi /etc/rc.d/rc.local<br />
<br />
在最后加上一句： /usr/local/apache/bin/apachectl start<br />
<br />
看这里的/usr/local/apache的安装路径用到了吧，所以大家装的时候一定要记清楚哦。。。。<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: Arial;"><span style="font-size: large;"><span style="color: rgb(255, 0, 0);">2.MySQL的安装</span></span></span><br />
<br />
<br />
用tar.gz的文件安装，也就是那个样子，重要的是注意./configure的时候<br />
<br />
./configure \<br />
<div style="margin-left: 40px;">&quot;--prefix=/usr/local/mysql&quot; \<br />
&quot;--localstatedir=/data/mysql/data&quot; \<br />
&quot;--with-comment=Source&quot; \<br />
&quot;--with-server-suffix=-Linuxtone.Org&quot; \<br />
&quot;--with-mysqld-user=mysql&quot; \<br />
&quot;--without-debug&quot; \<br />
&quot;--with-big-tables&quot; \<br />
&quot;--with-charset=gbk&quot; \<br />
&quot;--with-collation=gbk_chinese_ci&quot; \<br />
&quot;--with-extra-charsets=all&quot; \<br />
&quot;--with-pthread&quot; \<br />
&quot;--enable-static&quot; \</div>
]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_83_446.html]]></link>
<title><![CDATA[GANTZ Season 1 玄野、加藤、岸本、樱丘圣]]></title>
<author>claymore</author>
<category><![CDATA[ GANTZ ]]></category>
<pubDate>2009-09-02</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_83_446.html]]></guid>
<description><![CDATA[GANTZ(杀戮都市)不愧为一部暴力、血腥的动漫，暴力血腥是对象的，对于没见过踩死过的蚂蚁来说，这已经很暴力血腥了。<br />
<br />
一出场，我还是搜索到底谁是主角，就有个高中生(又是高中生...囧)出来一大堆妄想，估计这家伙就是主角了。<br />
<br />
在地铁那一幕，感觉到玄野是个冷漠的人，也许对于大多数人来说，颗粒理解他吧，冷漠，也是相对的，城市里，不乏玄野这样的人。<br />
<br />
第一话两个主角居然就翘翘了，尸体、脑袋到处乱飞，这设定很混乱。<br />
<br />
<img alt="" src="/userfiles/image/2009/09/01/fckeditor_20090901155245.jpg" /><br />
<br />
<img alt="" src="/userfiles/image/2009/09/01/fckeditor_20090901155258.jpg" /><br />
<br />
<br />
一出场的裸体巨乳也很混乱。<br />
<br />
这家伙(MM)我一直都看不顺眼，从第一次出场到翘翘，我都感觉特别厌烦这个角色。<br />
<br />
<br />
岸本惠是个巨乳，是巨乳没错，但是靠巨乳吃饭的话就让人厌恶。太多的，女人这种东西，大多靠躯体吃饭，容貌、身材可以发挥很大的优点，这都是使我感觉厌烦的地方。<br />
<br />
也许，这是先天的小&ldquo;错误&rdquo;，不能怪她。岸本惠裸体一出场惊天地、泣鬼神，一个流氓按柰不住拉她想去OOXX，最后被加藤所救，那一刻，加藤的英雄救美感动了岸本惠，并且使她&ldquo;喜欢&rdquo;上了他。第一次，这是否可以称为一见钟情呢？]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_3_445.html]]></link>
<title><![CDATA[局部变量？局部包含？以及函数里的文件包含]]></title>
<author>claymore</author>
<category><![CDATA[ 文件包含 require_once include require 笔记 ]]></category>
<pubDate>2009-09-02</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_3_445.html]]></guid>
<description><![CDATA[今天在写HTML生成的功能模块时遇到一个有趣的事情，出现了类重新定义的问题，我看了一下函数，里面有个include并且初始化了一个类对象，我以为这个问题出在那个类对象上，我也纳闷着，怎么可能呢，函数内部定义的变量和对象应该是局部的，怎么会出现重新定义的错误呢。<br />
<br />
于是我把问题放在了include上面，换成require_once后问题解决，原来函数内部包含文件是全局作用并不局限于函数内部，呵呵，真是有趣！！]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_15_444.html]]></link>
<title><![CDATA[如何解决下载的CHM文件无法显示网页问题]]></title>
<author>claymore</author>
<category><![CDATA[ CHM 无法显示 ]]></category>
<pubDate>2009-08-31</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_15_444.html]]></guid>
<description><![CDATA[如何解决下载的CHM文件无法显示网页问题　<br />
问题症状: 打开CHM文件，左边目录齐全，可右边边框里却是无法显示网页。<br />
<br />
解决方法: <br />
方法一: 修改注册表<br />
1）新建一个文本文件<br />
2）添加如下内容: <br />
REGEDIT4<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp]<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]<br />
&quot;MaxAllowedZone&quot;=dword:00000003<br />
另存为HTMLHelp.reg（或其它名称，只要是reg格式就行）<br />
3）双击刚刚新建的reg文件，将它导入注册表，OK，问题搞定<br />
不过这种方法不安全，因为它将将浏览区域等级调整为3了，存在安全隐患，故不推荐。<br />
<br />
方法二: 查找目录名称是否有问题，目录名称中有 &quot;#&quot; 字符，去掉有 CHM 文件就显示正常了。<br />
<br />
方法三: 有时候如果CHM是中文也会打不开，改成英文字符试验下。<br />
<br />
方法四.: 双击此 .chm 文件， 在&ldquo;打开文件安全警告&rdquo;对话框，单击以清除&ldquo;打开此文件前始终询问&rdquo;复选框。<br />
<br />
方法五:  右键单击该 CHM 文件，然后单击&ldquo;属性&rdquo;， 单击&ldquo;解除锁定&rdquo;，. 双击此 .chm 文件以打开此文件。<br />
<br />
本人遇到的问题是部分CHM文件不能打开，利用方法五，顺利解决。<br />
<br />
小知识:  CHM 意为 Compiled HTML。以CHM为扩展名的文件图标通常为一个带问号的文档图标，表示帮助文档，是 Microsoft 自 Windows 98 以来提供的一种帮助文档格式的文件，用于替代 Windows 95 下的 HLP(Help) 文件。Microsoft 自 Windows 98 以来，操作系统中都自带解释器(打开 CHM 文件的工具)，即 Windows 安装目录下的 HH.EXE。CHM 文件可以通过官方免费提供了 HTML Help Workshop 生成，它的源文件是 HTML 文件。现在网络上很多电子书籍都被制作成 CHM 格式。]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_63_443.html]]></link>
<title><![CDATA[关于text-overflow和white-space]]></title>
<author>claymore</author>
<category><![CDATA[ ]]></category>
<pubDate>2009-08-26</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_63_443.html]]></guid>
<description><![CDATA[两者都是CSS文本属性，首先说明一下：<br />
<br />
※ text-overflow:clip | ellipsis<br />
版本：IE6+专有属性<br />
取值：clip 默认值。不显示省略标记（...），而是简单的裁切；<br />
ellipsis 当对象内文本溢出时显示省略标记（...） 。<br />
说明：设置或检索是否使用一个省略标记（...） 标示对象内文本的溢出。 <br />
这个属性仅仅作用于水平内联方向的，普通的西方文本的溢出。内联溢出发生在行内的文本超出可用宽度却没有换行机会的时候。<br />
<br />
※ white-space:normal | pre | nowrap | inherit<br />
版本：未知<br />
取值：normal 默认值。文本自然换行。如果超过元素宽度，内容自然换到下一行； <br />
nowrap 不允许换行；<br />
inherit 浏览器自动选择； <br />
pre 保留换行和空白。这个值只有当你声明了!DOCTYPE，且 IE 6 以上版本才支持。<br />
说明：用来处理空白，适用于所有块类型的元素 (block elments)。<br />
在 HTML文件里，空白，比如换行符 (line breaks)、 空格 (spaces)、 制表符 (tabs)，都被自动截去。HTML会自动截去多余的空格。不管你加多少空格，都被看做一个空格。为了在网页中增加空格，你可以使用 &amp;nbsp; 表示空格。你也可以用&lt;br&gt;强制换行。<br />
<br />
要强制溢出发生并且应用ellipsis 值，必须设置对象的white-space 属性值为nowrap 。 ]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_3_442.html]]></link>
<title><![CDATA[关于ftp_nlist无法列表出目录的问题]]></title>
<author>claymore</author>
<category><![CDATA[ 函数 问题 解决 ]]></category>
<pubDate>2009-08-24</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_3_442.html]]></guid>
<description><![CDATA[其实重要的是看看PHP手册，上面写得很清楚，不过好象没放在十分显眼的地方，关于这个函数参数其实第二个参数里也可以带参数arguments，手册上写的：<br />
<br />
The directory to be listed. This parameter can also include arguments, eg.  ftp_nlist($conn_id, &quot;-la /your/dir&quot;); Note that this parameter isn't escaped so  there may be some issues with filenames containing spaces and other characters. <br />
<br />
不过注意的是有空格的目录。<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_7_441.html]]></link>
<title><![CDATA[使用JS与MediaPlayer编写网页播放器]]></title>
<author>claymore</author>
<category><![CDATA[ MediaPlayer 播放器 笔记 ]]></category>
<pubDate>2009-08-22</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_7_441.html]]></guid>
<description><![CDATA[刚开始我使用的是新版本9.0以后的mediaplayer插件，新版本的插件有很多功能、属性、方法和事件处理功能，并且最简单的是使用它的playlist功能控制播放器的播放,不过由于有权限的问题，这种方法在本机上可行，上传到服务器并且用其他的电脑访问则播放不了，提示&ldquo;没有权限&rdquo;，错误在这方法上appendItem,因为一般playlist的权限是只读的，不能创建或者修改，只能自己去设计一个播放列表，自己去修改url属性去选曲。所以放弃这种方法改用其他方法。<br />
<br />
<br />
参考官方的SDK信息，有很多，我只是截取了一部分如下:<br />
<br />
Media Library Access<br />
Properties and methods of the Windows Media Player object model that access Media Library require either read-only or read/write access to the database. Media Library contains information that some users want to keep private and that should only be accessed or altered with their consent.<br />
<br />
To determine the current level of access granted to your code, retrieve the Settings.mediaAccessRights property. That property returns &quot;none&quot;, &quot;read&quot;, or &quot;full&quot; (read/write). To request specific access rights, call the Settings.requestMediaAccessRights method, passing a parameter that specifies the level you are requesting. The method displays a message to the user explaining the requested level of access, and returns a Boolean value indicating whether the access was granted.]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_63_440.html]]></link>
<title><![CDATA[让DIV的over-flow:auto;只要竖滚动条，不要横滚动条]]></title>
<author>claymore</author>
<category><![CDATA[ 滚动条 ]]></category>
<pubDate>2009-08-13</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_63_440.html]]></guid>
<description><![CDATA[overflow-x : hidden ; <br />
<br />
相应的<br />
<br />
overflow-y : hidden ; <br />
<br />
<br />
<br />
注意设置好DIV的宽度和高度。<br />
<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_7_439.html]]></link>
<title><![CDATA[JavaScript try catch 处理语句]]></title>
<author>claymore</author>
<category><![CDATA[ try catch 异常处理 ]]></category>
<pubDate>2009-08-13</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_7_439.html]]></guid>
<description><![CDATA[以前很少用异常处理语句，因为并不觉得有什么优点的地方，认为只不过是检查错误时才使用的，没多大必要。<br />
其实异常处理语句结构可以屏蔽错误，当在try中的语句发生错误时，脚本执行不至于中断掉。<br />
特别是在javascript中，异常处理结构是相当的有用，很常用。<br />
<br />
结构如下:<br />
try <br />
{<br />
document.write(&quot;Try Here&lt;br/&gt;&quot;)<br />
throw &quot;a exception&quot; <br />
}<br />
<br />
catch (e)<br />
{<br />
document.write(&quot;Exception Message:&quot;+e)<br />
document.write(&quot;&lt;br/&gt;&quot;)<br />
}<br />
finally<br />
{<br />
document.write(&quot;Fially Here&quot;)<br />
}<br />
<br />
<br />
<br />
我使用过的:<br />
<br />
<br />
//当前播放曲目高亮<br />
try<br />
{<br />
for(i=0;;i++)<br />
{<br />
if(!list_array[i][1])break;<br />
$('#p'+i).css('background-color','');<br />
}<br />
}<br />
catch(e){}<br />
$('#p'+index).css('background-color','#EAFAFF');<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_1_438.html]]></link>
<title><![CDATA[硬盘资料丢失了]]></title>
<author>claymore</author>
<category><![CDATA[ 丢失 ]]></category>
<pubDate>2009-08-09</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_1_438.html]]></guid>
<description><![CDATA[今天用WINPE恢复系统的时候不小心把750G的硬盘格式化了，里面500多个G的数据全没了，找也找不回来，<br />
里面还有很多重要的数据以及一些辛苦收集的资料等，一下，几分钟，全没了，<br />
感觉心被掏空了一样...<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_437.html]]></link>
<title><![CDATA[非常全的javascript控制MediaPlayer的属性集合]]></title>
<author>claymore</author>
<category><![CDATA[ MediaPlayer 属性 ]]></category>
<pubDate>2009-08-02</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_437.html]]></guid>
<description><![CDATA[播放: MediaPlayer.Play() <br />
暂停: MediaPlayer.Pause() <br />
定位: MediaPlayer.SetCurrentEntry(lWhichEntry) <br />
MediaPlayer.Next() <br />
MediaPlayer.Previous() <br />
循环: MediaPlayer.PlayCount = 0 <br />
0:the clip plays repeatedly <br />
1:once <br />
停止: MediaPlayer.Stop() <br />
================================== <br />
AllowChangeDisplaySize 返回或设置最终用户是否能设置显示尺寸(逻辑型) <br />
AllowScan 返回或设置是否允许扫描(逻辑型) <br />
AnimationAtStart 返回或设置控件开始播放之前是否先播放一个动画序列(逻辑型) <br />
AudioStream 返回或设置音频流的编号(用于多音频流的剪辑，默认为-1)(长整型) <br />
AutoRewind 返回或设置媒体文件播放完毕后是否自动回绕(逻辑型) <br />
AutoSize 返回或设置是否自动调整控件大小来适应载入的媒体(逻辑型) <br />
AutoStart 返回或设置在载入媒体文件之后是否自动开始播放(逻辑型) <br />
Balance 返回或设置指定立体声媒体文件的播放声道(-10000为左声道，10000为右声道，0为立体声)(长整型) <br />
Bandwidth 返回或设置当前文件的带宽(长整型) <br />
BaseURL 返回基本的 HTTP URL(字符串) <br />
BufferingCount 返回媒体文件回放时缓冲的总时间(长整型) <br />
BufferingProgress 返回缓冲完成的百分比(长整型) <br />
BufferingTime 返回缓冲的时间(双精度型) <br />
CanPreview 返回或设置当前显示的剪辑是能否被预览(逻辑型) ]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_436.html]]></link>
<title><![CDATA[网页播放器代码大全]]></title>
<author>claymore</author>
<category><![CDATA[ 播放器 代码 ]]></category>
<pubDate>2009-08-02</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_436.html]]></guid>
<description><![CDATA[1.avi格式 <br />
代码片断如下： <br />
&lt;object id=&quot;video&quot; width=&quot;400&quot; height=&quot;200&quot; border=&quot;0&quot; classid=&quot;clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA&quot;&gt; <br />
&lt;param name=&quot;ShowDisplay&quot; value=&quot;0&quot;&gt; <br />
&lt;param name=&quot;ShowControls&quot; value=&quot;1&quot;&gt; <br />
&lt;param name=&quot;AutoStart&quot; value=&quot;1&quot;&gt; <br />
&lt;param name=&quot;AutoRewind&quot; value=&quot;0&quot;&gt; <br />
&lt;param name=&quot;PlayCount&quot; value=&quot;0&quot;&gt; <br />
&lt;param name=&quot;Appearance value=&quot;0 value=&quot;&quot;&quot;&gt; <br />
&lt;param name=&quot;BorderStyle value=&quot;0 value=&quot;&quot;&quot;&gt; <br />
&lt;param name=&quot;MovieWindowHeight&quot; value=&quot;240&quot;&gt; <br />
&lt;param name=&quot;MovieWindowWidth&quot; value=&quot;320&quot;&gt; <br />
&lt;param name=&quot;FileName&quot; value=&quot;/Mbar.avi&quot;&gt; <br />
&lt;embed width=&quot;400&quot; height=&quot;200&quot; border=&quot;0&quot; showdisplay=&quot;0&quot; showcontrols=&quot;1&quot; autostart=&quot;1&quot; autorewind=&quot;0&quot; playcount=&quot;0&quot; moviewindowheight=&quot;240&quot; moviewindowwidth=&quot;320&quot; filename=&quot;/Mbar.avi&quot; src=&quot;Mbar.avi&quot;&gt; <br />
&lt;/embed&gt; <br />
&lt;/object&gt;<br />
<br />
2.mpg格式 <br />
代码片断如下： <br />
&lt;object classid=&quot;clsid:05589FA1-C356-11CE-BF01-00AA0055595A&quot; id=&quot;ActiveMovie1&quot; width=&quot;239&quot; height=&quot;250&quot;&gt; ]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_1_435.html]]></link>
<title><![CDATA[思念]]></title>
<author>claymore</author>
<category><![CDATA[ 思念 夕阳 ]]></category>
<pubDate>2009-08-01</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_1_435.html]]></guid>
<description><![CDATA[我坐在这，想你，<br />
夏日的夕阳染红了雨后的彩虹。<br />
<br />
一切都已经过去，<br />
然而，在记忆深处，<br />
思念仍在发芽...<br />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_434.html]]></link>
<title><![CDATA[15个Web在线WYSIWYG编辑器]]></title>
<author>claymore</author>
<category><![CDATA[ 编辑器 WYSIWYG ]]></category>
<pubDate>2009-07-31</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_434.html]]></guid>
<description><![CDATA[<div>基于WEB的HTML 编辑器，WYSIWYG所见即所得的编辑器，或是一个富文本的编辑器，是我们在开发WEB应用时接收用户输入时必需要考虑的问题。下面是一些开源的WEB在线的WYSWIG编辑器。<br />
&nbsp;</div>
<div><b><font size="4">1. <a onclick="pageTracker._trackPageview('/outgoing/www.fckeditor.net/?referer=http://cocre.com/');" target=" "_blank"" href="http://www.fckeditor.net/" title="FCKeditor">FCKeditor</a></font></b></div>
<div>FCKeditor 这些在线编辑器中最著名的一个，其功能相当的强大，很像一个Web的Word软件。它可以方便地和ASP, ASP.NET, PHP, Java, Perl, Phyton 等Web开发语言所集成。并支持皮肤，拼写检查。其还可以配置成一个轻量级的编辑器。而且，它还有很多相当酷的功能。<br />
<img width="500" height="161" alt="FCKeditor" src="http://www.webdesignbooth.com/wp-content/uploads/2009/07/fckeditor.jpg" title="FCKeditor" /><br />
<br />
&nbsp;</div>
<div><b><font size="4">2. <a onclick="pageTracker._trackPageview('/outgoing/nicedit.com/?referer=http://cocre.com/');" target=" "_blank"" href="http://nicedit.com/" title="NicEdit">NicEdit</a></font></b></div>
<div>NicEdit 是一个基于Javascript 编辑器，它可以很容易地被集成到任意的网页中。它还可以把网页上任何的element/div 转成可以编辑的标准的控件。<img width="500" height="104" alt="NicEdit" src="http://www.webdesignbooth.com/wp-content/uploads/2009/07/nicedit.jpg" title="NicEdit" /><br />
<br />
&nbsp;</div>
]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_1_433.html]]></link>
<title><![CDATA[最近我都做什么去了？]]></title>
<author>claymore</author>
<category><![CDATA[ 什么 做什么 去了 ]]></category>
<pubDate>2009-07-29</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_1_433.html]]></guid>
<description><![CDATA[将近一个月没有更新博客了，自从暑假放假以来没什么事情做，大家不是回家就是玩游戏的，生活一下没有了感觉到的激情。<br />
<br />
没激情，内心就很空虚。<br />
<br />
怎么办？<br />
<br />
对一个像我这样的男生或者对普通的、一般的、大多数的男生来说，答案只有一个: 玩游戏。<br />
<br />
额...空虚的内心需要激情的游戏来安慰，所以，找游戏，纠集点同学朋友一起玩，可惜，我的个人魅力太低，没纠集到几个人，玩了几天&ldquo;成吉思汗&rdquo;(这个月17号开始公测的)，玩到41令各位同学朋友失望了，我跑路了。接着还是继续玩我的传奇，找SF来玩，天天玩&ldquo;一夜情&rdquo;，玩一个扔一个继续找...就这样持续到了现在。<br />
<br />
可是，依旧空虚。<br />
<br />
心情沮丧，这学期挂了两科，一科还是必修的&ldquo;算法设计&rdquo;，开学还要补考，暑假也不能出去找实习了，心里纠结！！！<br />
<br />
可恶为什么就我挂了，我就不知道怎么会挂的，可恶之极，刚开始看到成绩没什么感觉，现在想起来就气愤，我怎么会挂呢，想想就不爽。<br />
<br />
所以呢，还是需要一些东西来安慰我纠结的内心，这时，游戏就发挥了极大的作用。<br />
<br />
<br />
但是玩了将近一个月了，暑假人人都想要玩。可是回过头来看看一个月前我放下和耽搁的东西，呀，这代码我写到哪儿了，那些部分的哪些内容应该要修改的，哪些功能要增加和修改的，我的天，忘了。。。。<img src="/userfiles/image/custom_smiley/FeiLiuTu/2008091823372973.gif" alt="" />]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_432.html]]></link>
<title><![CDATA[MediaPlayer的事件]]></title>
<author>claymore</author>
<category><![CDATA[ Javascript MediaPlayer 播放器 事件 ]]></category>
<pubDate>2009-07-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_432.html]]></guid>
<description><![CDATA[<div>在Web页中嵌入Media Player的方法比较简单，只要用HTML中的&lt;Object&gt;&lt;/Object&gt;可以了，如下所示。<br />
<br />
&lt;OBJECT ID=&quot;WMPlay&quot; WIDTH=320 HEIGHT=240<br />
CLASSID=&quot;CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95&quot;<br />
CODEBASE=&quot;http://activex.microsoft.com/activex/controls/mplayer/en/<br />
nsmp2inf.cab#Version=6,4,5,715&quot;<br />
STANDBY=&quot;Loading Microsoft&nbsp;&nbsp;Windows Media Player components...&quot;<br />
TYPE=&quot;application/x-oleobject&quot;&gt;<br />
&lt;/OBJECT&gt;<br />
<br />
其中ID是对象的名称，当用户在JavaScript要对Media Player进行控制时可以用该对象的名称WMPlay进行访问。CODEBASE指明当用户的浏览器中没有安装Player控件时可以从该URL指定的位置去获取。<br />
当然在建立Player对象时也可以用&lt;PARAM &gt;来为其指定参数。如下所示: <br />
<br />
&lt;PARAM NAME=&quot;FileName&quot; VALUE=&quot;C:ASFRootWelcome.asf&quot;&gt;<br />
&lt;PARAM NAME=&quot;ShowControls&quot; VALUE=&quot;False&quot;&gt;<br />
&lt;PARAM NAME=&quot;AutoRewind&quot; VALUE=&quot;True&quot;&gt;<br />
&lt;PARAM NAME=&quot;AutoStart&quot; VALUE=&quot;False&quot;&gt;<br />
<br />
其中&quot;FileName&quot;参数表示Media Player要播放的文件活或流。&quot;ShowControls&quot;表示在播放时是否显示控制条。Media Player的参数很多，我们在此不再一一详述。读者如果需要了解更详细的内容可以参考Media Player SDK中的相关部分。<br />
如果用户需要对Media Player进行控制可以用JavaScript进行控制。<br />
<br />
<br />
在这个例子中，Media Player嵌入在Web页面中，在Media Player右边有一些按钮，利用这些按钮用户可以控制Media Player的播放活动。这些按钮的HTML代码如下: <br />
<br />
&lt;form name=&quot;myform&quot;&gt;<br />
&lt;input type=&quot;button&quot; width=&quot;15&quot; value=&quot;No Controls &quot; name=&quot;NoControls&quot;<br />
OnClick=&quot;controlType(false)&quot;&gt;<br />
&lt;input type=&quot;button&quot; width=&quot;15&quot; value=&quot;All Controls&quot; name=&quot;Full&quot;<br />
Onclick=&quot;controlType(true)&quot;&gt;<br />
&lt;input type=&quot;button&quot; width=&quot;15&quot; value=&quot; Small &quot; name=&quot;Small&quot;<br />
OnClick=&quot;displaySize(1)&quot;&gt;<br />
&lt;input type=&quot;button&quot; value=&quot; Large &quot; name=&quot;Large&quot;<br />
Onclick=&quot;displaySize(2)&quot;&gt;<br />
&lt;input type=&quot;button&quot; width=&quot;15&quot; value=&quot; Normal &quot; name=&quot;Normal&quot;<br />
Onclick=&quot;displaySize(0)&quot;&gt;<br />
&lt;input type=&quot;button&quot; width=&quot;15&quot; value=&quot; Play &quot; name=&quot;Play&quot;<br />
Onclick=&quot;PlayClick()&quot;&gt;<br />
&lt;input type=&quot;button&quot; width=&quot;15&quot; value=&quot; Stop &quot; name=&quot;Stop&quot;<br />
Onclick=&quot;StopClick()&quot;&gt;<br />
&lt;/form&gt;<br />
<br />
<strong>相应的JavaScript代码为：</strong><br />
<br />
&lt;script language=&quot;javascript&quot;&gt;<br />
&lt;!--<br />
var g_Browser = navigator.appName;<br />
function controlType (setting)<br />
{<br />
if (g_Browser == &quot;Netscape&quot;)<br />
document.WMPlay.SetShowControls(setting);<br />
else<br />
document.WMPlay.ShowControls = setting;<br />
}<br />
function displaySize (setting)<br />
{<br />
if (g_Browser == &quot;Netscape&quot;)<br />
document.WMPlay.SetDisplaySize(setting);<br />
else<br />
document.WMPlay.DisplaySize = setting;<br />
}<br />
function PlayClick ()<br />
{<br />
document.WMPlay.Play();<br />
}<br />
function StopClick ()<br />
{<br />
document.WMPlay.Stop();<br />
if (g_Browser == &quot;Netscape&quot;)<br />
document.WMPlay.SetCurrentPosition(0);<br />
else<br />
document.WMPlay.CurrentPosition = 0;<br />
}<br />
function PauseClick ()<br />
{<br />
document.WMPlay.Pause();<br />
}<br />
function PlayPauseClick ()<br />
{<br />
var state;<br />
if (g_Browser == &quot;Netscape&quot;)<br />
state = document.WMPlay.GetPlayState();<br />
else<br />
state = document.WMPlay.PlayState;<br />
if (state == 0)<br />
document.WMPlay.Play();<br />
else if (state == 1)<br />
document.WMPlay.Play();<br />
else if (state == 2)<br />
document.WMPlay.Pause();<br />
<br />
}<br />
//--&gt;<br />
&lt;/script&gt;<br />
<br />
<br />
从这个例子可以看出当用户单即其中的某个按钮时，它对应的OnClick函数将被调用。在JavaScript函数中，可以直接用WMPlay来控制播放器的活动，比如开始播放，停止播放或占停播放，以及放大缩小等。<br />
<br />
<br />
除了可以用动作比如鼠标的动作来对嵌入的Media Player进行控制外，还可以利用事件来对其进行控制。Microsoft? Windows Media &nbsp;Player 支持的事件很多，有普通的鼠标事件，比如鼠标的单击、双击、鼠标的移动、鼠标键的按下与松开等，也有一些是Media Player特有的事件。与流播放有直接关系的事件有: OpenStateChange，PlayStateChange，Buffering，MarkerHit，ScriptCommand等。下面我们对这几个重要的事件做简单地介绍。<br />
<br />
<strong>1 OpenStateChange 事件</strong><br />
OpenStateChange 事件表示Player的状态已经发生了改变。Media Player的打开状态有: <br />
0 表示流已经关闭(nsClosed)<br />
1 表示正在装入ASX文件(nsLoadingASX)<br />
2 表示正在装入NSC文件(nsLoadingNSC)<br />
3 表示正在寻找Media Server (nsLocating)<br />
4 表示正在与Media Server建立连接(nsConnecting)<br />
5 表示正在打开或侦听流信息(nsOpening)<br />
6 表示流信息已经打开(nsOpen)<br />
<br />
用JavaScript处理OpenStateChange事件的格式如下: <br />
&lt;SCRIPT FOR=&quot;MediaPlayer&quot; EVENT=&quot;OpenStateChange(lOldState, lNewState)&quot;<br />
LANGUAGE=&quot;JScript&quot;&gt;<br />
//insert script commands//<br />
&lt;/SCRIPT&gt;<br />
<br />
其中MediaPlayer是在&lt;OBJECT&gt;&lt;/OBJECT&gt;中定义的Media Player对象时的名字。<br />
<br />
<br />
<strong>2 PlayStateChange 事件</strong><br />
PlayStateChange 事件表示Media Player的播放状态已经改变，Media Player可能的状态有: <br />
0 播放已经停止(mpStopped)<br />
1 播放暂停(mpPaused )<br />
2 正在播放(mpPlaying)<br />
3 正在等待流开始(mpWaiting)<br />
4 向前搜索(mpScanForward)<br />
5 向后搜索(mpScanReverse)<br />
6 向前跳跃(mpSkipForward)<br />
7 向后跳跃(mpSkipReverse)<br />
8 流已经关闭(mpClosed)<br />
<br />
用JavaScript处理该事件的方法为: <br />
<br />
&lt;SCRIPT FOR=&quot;MediaPlayer&quot; EVENT=&quot;PlayStateChange(lOldState, lNewState)&quot;<br />
LANGUAGE=&quot;JScript&quot;&gt;<br />
//insert script commands//<br />
&lt;/SCRIPT&gt;<br />
<br />
<br />
&nbsp;</div>
]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_431.html]]></link>
<title><![CDATA[js控制MediaPlayer播放器循环播放]]></title>
<author>claymore</author>
<category><![CDATA[ Javascript MediaPlayer 播放器 循环 ]]></category>
<pubDate>2009-07-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_431.html]]></guid>
<description><![CDATA[没想过要用这个东西，但群里有人问，这个地址也是群里的朋友贴出来的，仔细想想这个东西也有应用的场景，比如歌词的控制。能够得到播放时间，就能够控制歌词的显示了。估计那些用JS做的播放器大致都是这样的吧？猜测而已<br />
<br />
内容如下：http://roln.cn/archives/80<br />
<br />
&lt;!&ndash;播放器 开始&ndash;&gt;<br />
&lt;object id=&rdquo;Exobud&rdquo; style=&rdquo;width: 273px; height: 64px&rdquo; type=&rdquo;application/x-oleobject&rdquo;<br />
classid=&rdquo;CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6&Prime;&gt;<br />
&lt;param name=&rdquo;URL&rdquo; value=&rdquo;&quot;/&gt;<br />
&lt;param name=&rdquo;rate&rdquo; value=&rdquo;1&Prime;/&gt;<br />
&lt;param name=&rdquo;balance&rdquo; value=&rdquo;0&Prime;/&gt;<br />
&lt;param name=&rdquo;currentPosition&rdquo; value=&rdquo;0&Prime;/&gt;<br />
&lt;param name=&rdquo;defaultFrame&rdquo; value=&rdquo;&quot;/&gt;<br />
&lt;param name=&rdquo;playCount&rdquo; value=&rdquo;1&Prime;/&gt;<br />
&lt;param name=&rdquo;autoStart&rdquo; value=&rdquo;-1&Prime;/&gt;<br />
&lt;param name=&rdquo;currentMarker&rdquo; value=&rdquo;0&Prime;/&gt;<br />
&lt;param name=&rdquo;invokeURLs&rdquo; value=&rdquo;-1&Prime;/&gt;<br />
&lt;param name=&rdquo;baseURL&rdquo; value=&rdquo;&quot;/&gt;<br />
&lt;param name=&rdquo;volume&rdquo; value=&rdquo;80&Prime;/&gt;<br />
&lt;param name=&rdquo;mute&rdquo; value=&rdquo;0&Prime;/&gt;<br />
&lt;param name=&rdquo;uiMode&rdquo; value=&rdquo;full&rdquo;/&gt;]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_430.html]]></link>
<title><![CDATA[js控制MediaPlayer播放器]]></title>
<author>claymore</author>
<category><![CDATA[ Javascript MediaPlayer 播放器 ]]></category>
<pubDate>2009-07-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_430.html]]></guid>
<description><![CDATA[其实用js来做一个音乐播放器很容易，因为mediaplayer提供了一系列的接口来对网页嵌入的播放器进行控制。下面简单的介绍一下: <br />
<br />
在网页内插入播放器的代码为: <br />
<br />
<br />
&lt;object id=&quot;player&quot; height=&quot;64&quot; width=&quot;260&quot; classid=&quot;CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6&quot;&gt;<br />
&lt;param NAME=&quot;AutoStart&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否自动播放--&gt;<br />
&lt;param NAME=&quot;Balance&quot; VALUE=&quot;0&quot;&gt;<br />
&lt;!--调整左右声道平衡,同上面旧播放器代码--&gt;<br />
&lt;param name=&quot;enabled&quot; value=&quot;-1&quot;&gt;<br />
&lt;!--播放器是否可人为控制--&gt;<br />
&lt;param NAME=&quot;EnableContextMenu&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否启用上下文菜单--&gt;<br />
&lt;param NAME=&quot;url&quot; value=&quot;/blog/1.wma&quot;&gt;<br />
&lt;!--播放的文件地址--&gt;<br />
&lt;param NAME=&quot;PlayCount&quot; VALUE=&quot;1&quot;&gt;<br />
&lt;!--播放次数控制,为整数--&gt;<br />
&lt;param name=&quot;rate&quot; value=&quot;1&quot;&gt;<br />
&lt;!--播放速率控制,1为正常,允许小数,1.0-2.0--&gt;<br />
&lt;param name=&quot;currentPosition&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前位置--&gt;<br />
&lt;param name=&quot;currentMarker&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前标记--&gt;<br />
&lt;param name=&quot;defaultFrame&quot; value=&quot;&quot;&gt;]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_429.html]]></link>
<title><![CDATA[js控制MediaPlayer播放器]]></title>
<author>claymore</author>
<category><![CDATA[ Javascript MediaPlayer 播放器 ]]></category>
<pubDate>2009-07-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_429.html]]></guid>
<description><![CDATA[其实用js来做一个音乐播放器很容易，因为mediaplayer提供了一系列的接口来对网页嵌入的播放器进行控制。下面简单的介绍一下: <br />
<br />
在网页内插入播放器的代码为: <br />
<br />
<br />
&lt;object id=&quot;player&quot; height=&quot;64&quot; width=&quot;260&quot; classid=&quot;CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6&quot;&gt;<br />
&lt;param NAME=&quot;AutoStart&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否自动播放--&gt;<br />
&lt;param NAME=&quot;Balance&quot; VALUE=&quot;0&quot;&gt;<br />
&lt;!--调整左右声道平衡,同上面旧播放器代码--&gt;<br />
&lt;param name=&quot;enabled&quot; value=&quot;-1&quot;&gt;<br />
&lt;!--播放器是否可人为控制--&gt;<br />
&lt;param NAME=&quot;EnableContextMenu&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否启用上下文菜单--&gt;<br />
&lt;param NAME=&quot;url&quot; value=&quot;/blog/1.wma&quot;&gt;<br />
&lt;!--播放的文件地址--&gt;<br />
&lt;param NAME=&quot;PlayCount&quot; VALUE=&quot;1&quot;&gt;<br />
&lt;!--播放次数控制,为整数--&gt;<br />
&lt;param name=&quot;rate&quot; value=&quot;1&quot;&gt;<br />
&lt;!--播放速率控制,1为正常,允许小数,1.0-2.0--&gt;<br />
&lt;param name=&quot;currentPosition&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前位置--&gt;<br />
&lt;param name=&quot;currentMarker&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前标记--&gt;<br />
&lt;param name=&quot;defaultFrame&quot; value=&quot;&quot;&gt;]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_428.html]]></link>
<title><![CDATA[js控制MediaPlayer播放器]]></title>
<author>claymore</author>
<category><![CDATA[ Javascript MediaPlayer 播放器 ]]></category>
<pubDate>2009-07-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_428.html]]></guid>
<description><![CDATA[其实用js来做一个音乐播放器很容易，因为mediaplayer提供了一系列的接口来对网页嵌入的播放器进行控制。下面简单的介绍一下: <br />
<br />
在网页内插入播放器的代码为: <br />
<br />
<br />
&lt;object id=&quot;player&quot; height=&quot;64&quot; width=&quot;260&quot; classid=&quot;CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6&quot;&gt;<br />
&lt;param NAME=&quot;AutoStart&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否自动播放--&gt;<br />
&lt;param NAME=&quot;Balance&quot; VALUE=&quot;0&quot;&gt;<br />
&lt;!--调整左右声道平衡,同上面旧播放器代码--&gt;<br />
&lt;param name=&quot;enabled&quot; value=&quot;-1&quot;&gt;<br />
&lt;!--播放器是否可人为控制--&gt;<br />
&lt;param NAME=&quot;EnableContextMenu&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否启用上下文菜单--&gt;<br />
&lt;param NAME=&quot;url&quot; value=&quot;/blog/1.wma&quot;&gt;<br />
&lt;!--播放的文件地址--&gt;<br />
&lt;param NAME=&quot;PlayCount&quot; VALUE=&quot;1&quot;&gt;<br />
&lt;!--播放次数控制,为整数--&gt;<br />
&lt;param name=&quot;rate&quot; value=&quot;1&quot;&gt;<br />
&lt;!--播放速率控制,1为正常,允许小数,1.0-2.0--&gt;<br />
&lt;param name=&quot;currentPosition&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前位置--&gt;<br />
&lt;param name=&quot;currentMarker&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前标记--&gt;<br />
&lt;param name=&quot;defaultFrame&quot; value=&quot;&quot;&gt;]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_427.html]]></link>
<title><![CDATA[js控制MediaPlayer播放器]]></title>
<author>claymore</author>
<category><![CDATA[ Javascript MediaPlayer 播放器 ]]></category>
<pubDate>2009-07-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_427.html]]></guid>
<description><![CDATA[其实用js来做一个音乐播放器很容易，因为mediaplayer提供了一系列的接口来对网页嵌入的播放器进行控制。下面简单的介绍一下: <br />
<br />
在网页内插入播放器的代码为: <br />
<br />
<br />
&lt;object id=&quot;player&quot; height=&quot;64&quot; width=&quot;260&quot; classid=&quot;CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6&quot;&gt;<br />
&lt;param NAME=&quot;AutoStart&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否自动播放--&gt;<br />
&lt;param NAME=&quot;Balance&quot; VALUE=&quot;0&quot;&gt;<br />
&lt;!--调整左右声道平衡,同上面旧播放器代码--&gt;<br />
&lt;param name=&quot;enabled&quot; value=&quot;-1&quot;&gt;<br />
&lt;!--播放器是否可人为控制--&gt;<br />
&lt;param NAME=&quot;EnableContextMenu&quot; VALUE=&quot;-1&quot;&gt;<br />
&lt;!--是否启用上下文菜单--&gt;<br />
&lt;param NAME=&quot;url&quot; value=&quot;/blog/1.wma&quot;&gt;<br />
&lt;!--播放的文件地址--&gt;<br />
&lt;param NAME=&quot;PlayCount&quot; VALUE=&quot;1&quot;&gt;<br />
&lt;!--播放次数控制,为整数--&gt;<br />
&lt;param name=&quot;rate&quot; value=&quot;1&quot;&gt;<br />
&lt;!--播放速率控制,1为正常,允许小数,1.0-2.0--&gt;<br />
&lt;param name=&quot;currentPosition&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前位置--&gt;<br />
&lt;param name=&quot;currentMarker&quot; value=&quot;0&quot;&gt;<br />
&lt;!--控件设置:当前标记--&gt;<br />
&lt;param name=&quot;defaultFrame&quot; value=&quot;&quot;&gt;]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_36_426.html]]></link>
<title><![CDATA[用Javascript控制MediaPlayer的播放]]></title>
<author>claymore</author>
<category><![CDATA[ Javascript MediaPlayer 播放器 ]]></category>
<pubDate>2009-07-08</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_36_426.html]]></guid>
<description><![CDATA[&lt;object classid=&quot;clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95&quot; id=&quot;mp&quot; width=&quot;300&quot; height=&quot;240&quot;&gt;<br />
&lt;param name=&quot;AudioStream&quot; value=&quot;-1&quot;&gt;<br />
&lt;param name=&quot;AutoSize&quot; value=&quot;-1&quot;&gt;<br />
&lt;!--是否自动调整播放大小--&gt;<br />
&lt;param name=&quot;AutoStart&quot; value=&quot;-1&quot;&gt;<br />
&lt;!--是否自动播放--&gt;<br />
&lt;param name=&quot;AnimationAtStart&quot; value=&quot;-1&quot;&gt;<br />
&lt;param name=&quot;AllowScan&quot; value=&quot;-1&quot;&gt;<br />
&lt;param name=&quot;AllowChangeDisplaySize&quot; value=&quot;-1&quot;&gt;<br />
&lt;param name=&quot;AutoRewind&quot; value=&quot;0&quot;&gt;<br />
&lt;param name=&quot;Balance&quot; value=&quot;0&quot;&gt;<br />
&lt;!--左右声道平衡,最左-9640,最右9640--&gt;<br />
&lt;param name=&quot;BaseURL&quot; value&gt;<br />
&lt;param name=&quot;BufferingTime&quot; value=&quot;15&quot;&gt;<br />
&lt;!--缓冲时间--&gt;<br />
&lt;param name=&quot;CaptioningID&quot; value&gt;<br />
&lt;param name=&quot;ClickToPlay&quot; value=&quot;-1&quot;&gt;<br />
&lt;param name=&quot;CursorType&quot; value=&quot;0&quot;&gt;<br />
&lt;param name=&quot;CurrentPosition&quot; value=&quot;0&quot;&gt;<br />
&lt;!--当前播放进度 -1 表示不变,0表示开头 单位是秒,比如10表示从第10秒处开始播放,值必须是-1.0或<br />
<br />
大于等于0--&gt;<br />
&lt;param name=&quot;CurrentMarker&quot; value=&quot;0&quot;&gt;]]></description>
</item>
<item>
<link><![CDATA[http://claymore.phpme.info/index.php/view_46_425.html]]></link>
<title><![CDATA[MySQL外键(foreign key)的用法]]></title>
<author>claymore</author>
<category><![CDATA[ 外键 ]]></category>
<pubDate>2009-07-05</pubDate>
<guid><![CDATA[http://claymore.phpme.info/index.php/view_46_425.html]]></guid>
<description><![CDATA[在MySQL中MyISAM和InnoDB存储引擎都支持外键(foreign key)，但是MyISAM只能支持语法，却不能实际使用。下面通过例子记录下InnoDB中外键的使用方法： <br />
<br />
创建主表： <br />
mysql&gt; create table parent(id int not null,primary key(id)) engine=innodb; <br />
Query OK, 0 rows affected (0.04 sec) <br />
创建从表： <br />
mysql&gt; create table child(id int,parent_id int,foreign key (parent_id) references parent(id) on delete cascade) engine=innodb; <br />
Query OK, 0 rows affected (0.04 sec) <br />
<br />
<br />
插入主表测试数据： <br />
mysql&gt; insert into parent values(1),(2),(3); <br />
Query OK, 3 rows affected (0.03 sec) <br />
Records: 3 Duplicates: 0 Warnings: 0 <br />
插入从表测试数据： <br />
mysql&gt; insert into child values(1,1),(1,2),(1,3),(1,4); <br />
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`test/child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`) ON DELETE CASCADE) <br />
<br />
因为4不在主表中，插入时发生了外键约束错误。 <br />
<br />
只插入前三条： <br />
mysql&gt; insert into child values(1,1),(1,2),(1,3); <br />
Query OK, 3 rows affected (0.03 sec) <br />
Records: 3 Duplicates: 0 Warnings: 0 <br />
成功！ <br />
<br />
<br />
删除主表记录，从表也将同时删除相应记录： <br />
mysql&gt; delete from parent where id=1; <br />
Query OK, 1 row affected (0.03 sec) ]]></description>
</item>
</channel>
</rss>