<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fish的航海日志 &#187; Programming</title>
	<atom:link href="http://blog.v2op.com/category/technology/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.v2op.com</link>
	<description>海到无边天做岸,山登绝顶我为峰</description>
	<lastBuildDate>Mon, 30 Jan 2012 04:30:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>程序员三大法则</title>
		<link>http://blog.v2op.com/2011/01/three-laws-of-programmers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=three-laws-of-programmers</link>
		<comments>http://blog.v2op.com/2011/01/three-laws-of-programmers/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 15:26:57 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=556</guid>
		<description><![CDATA[第一法则 程序员不得损害产品质量，或袖手旁观产品质量受到损害。 第二法则 程序员必须服从产品经理的命令，除非违背第一法则。 第三法则 程序员必须保护自己，除非违背第一和第二法则。 据说还有一条繁殖定律： 繁殖定律 程序员不得参与程序员的孕育和培养，除非新程序员的行动符合以上三大法则。 参考资料：Three Laws of Robotics 转载<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="程序设计的十个做与不做" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2011%2F05%2Ftop-ten-things-ten-years-of-professional-software-development-has-taught-me%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">程序设计的十个做与不做</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="程序出错后，程序员给测试人员的20条高频回复" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2011%2F04%2F%25E7%25A8%258B%25E5%25BA%258F%25E5%2587%25BA%25E9%2594%2599%25E5%2590%258E%25EF%25BC%258C%25E7%25A8%258B%25E5%25BA%258F%25E5%2591%2598%25E7%25BB%2599%25E6%25B5%258B%25E8%25AF%2595%25E4%25BA%25BA%25E5%2591%2598%25E7%259A%258420%25E6%259D%25A1%25E9%25AB%2598%25E9%25A2%2591%25E5%259B%259E%25E5%25A4%258D%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">程序出错后，程序员给测试人员的20条高频回复</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="《moly》《in》2008限量版台历" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F12%2F%25E3%2580%258Amoly%25E3%2580%258B%25E3%2580%258Ain%25E3%2580%258B2008%25E9%2599%2590%25E9%2587%258F%25E7%2589%2588%25E5%258F%25B0%25E5%258E%2586%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669694.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">《moly》《in》2008限量版台历</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="2009-02-14 07:31:30" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F02%2F1234567890day%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669449.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">2009-02-14 07:31:30</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<h3>第一法则</h3>
<p>程序员不得损害产品质量，或袖手旁观产品质量受到损害。</p>
<h3>第二法则</h3>
<p>程序员必须服从产品经理的命令，除非违背第一法则。</p>
<h3>第三法则</h3>
<p>程序员必须保护自己，除非违背第一和第二法则。</p>
<p>据说还有一条繁殖定律：</p>
<h3>繁殖定律</h3>
<p>程序员不得参与程序员的孕育和培养，除非新程序员的行动符合以上三大法则。</p>
<p>参考资料：<a href="http://en.wikipedia.org/wiki/Three_Laws_of_Robotics">Three Laws of Robotics</a></p>
<p><a href="http://lifesinger.org/blog/2011/01/three-laws-of-programmers/">转载</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="程序设计的十个做与不做" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2011%2F05%2Ftop-ten-things-ten-years-of-professional-software-development-has-taught-me%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">程序设计的十个做与不做</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="程序出错后，程序员给测试人员的20条高频回复" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2011%2F04%2F%25E7%25A8%258B%25E5%25BA%258F%25E5%2587%25BA%25E9%2594%2599%25E5%2590%258E%25EF%25BC%258C%25E7%25A8%258B%25E5%25BA%258F%25E5%2591%2598%25E7%25BB%2599%25E6%25B5%258B%25E8%25AF%2595%25E4%25BA%25BA%25E5%2591%2598%25E7%259A%258420%25E6%259D%25A1%25E9%25AB%2598%25E9%25A2%2591%25E5%259B%259E%25E5%25A4%258D%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">程序出错后，程序员给测试人员的20条高频回复</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="iPhone 3G" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F01%2Fiphone-3g%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669589.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">iPhone 3G</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress 输出带格式的 RSS Feed" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F07%2Fwordpress-rss-feed-format-for-planet%2F&from=http%3A%2F%2Fblog.v2op.com%2F2011%2F01%2Fthree-laws-of-programmers%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669316.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 输出带格式的 RSS Feed</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2011/01/three-laws-of-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP上传大文件时的参数设置</title>
		<link>http://blog.v2op.com/2010/08/upload-large-files-in-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=upload-large-files-in-php</link>
		<comments>http://blog.v2op.com/2010/08/upload-large-files-in-php/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 06:37:34 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=551</guid>
		<description><![CDATA[在php.ini修改如下参数： php_value upload_max_filesize 10M php_value post_max_size 10M php_value max_input_time 300 php_value max_execution_time 300 或者在程序中加上： ini_set(&#8216;upload_max_filesize&#8217;, &#8217;10M&#8217;); ini_set(&#8216;post_max_size&#8217;, &#8217;10M&#8217;); ini_set(&#8216;max_input_time&#8217;, 300); ini_set(&#8216;max_execution_time&#8217;, 300);<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="10大PHP框架" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669338.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">10大PHP框架</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP6测试版发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F04%2Fphp6%25E6%25B5%258B%25E8%25AF%2595%25E7%2589%2588%25E5%258F%2591%25E5%25B8%2583%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP6测试版发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="40个迹象表明你还是PHP菜鸟" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2F40%25E4%25B8%25AA%25E8%25BF%25B9%25E8%25B1%25A1%25E8%25A1%25A8%25E6%2598%258E%25E4%25BD%25A0%25E8%25BF%2598%25E6%2598%25AFphp%25E8%258F%259C%25E9%25B8%259F%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">40个迹象表明你还是PHP菜鸟</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="图文详解：配置Apache+Mysql+PHP开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F03%2Fapache-mysql-php-wamp%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669437.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">图文详解：配置Apache+Mysql+PHP开发环境</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在php.ini修改如下参数：</p>
<p>php_value upload_max_filesize 10M<br />
php_value post_max_size 10M<br />
php_value max_input_time 300<br />
php_value max_execution_time 300</p>
<p>或者在程序中加上：</p>
<p>ini_set(&#8216;upload_max_filesize&#8217;, &#8217;10M&#8217;);<br />
ini_set(&#8216;post_max_size&#8217;, &#8217;10M&#8217;);<br />
ini_set(&#8216;max_input_time&#8217;, 300);<br />
ini_set(&#8216;max_execution_time&#8217;, 300);</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="10大PHP框架" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669338.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">10大PHP框架</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP6测试版发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F04%2Fphp6%25E6%25B5%258B%25E8%25AF%2595%25E7%2589%2588%25E5%258F%2591%25E5%25B8%2583%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP6测试版发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="40个迹象表明你还是PHP菜鸟" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2F40%25E4%25B8%25AA%25E8%25BF%25B9%25E8%25B1%25A1%25E8%25A1%25A8%25E6%2598%258E%25E4%25BD%25A0%25E8%25BF%2598%25E6%2598%25AFphp%25E8%258F%259C%25E9%25B8%259F%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">40个迹象表明你还是PHP菜鸟</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="图文详解：配置Apache+Mysql+PHP开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F03%2Fapache-mysql-php-wamp%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669437.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">图文详解：配置Apache+Mysql+PHP开发环境</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2010/08/upload-large-files-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>移除URL中的.php后缀</title>
		<link>http://blog.v2op.com/2010/08/remove-php-extension-from-url/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remove-php-extension-from-url</link>
		<comments>http://blog.v2op.com/2010/08/remove-php-extension-from-url/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 06:32:37 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=550</guid>
		<description><![CDATA[利用URL重写，在.htaccess中添加下面这段： RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^([^/]+)/$ $1.php<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="10大PHP框架" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669338.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">10大PHP框架</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP6测试版发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F04%2Fphp6%25E6%25B5%258B%25E8%25AF%2595%25E7%2589%2588%25E5%258F%2591%25E5%25B8%2583%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP6测试版发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP上传大文件时的参数设置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP上传大文件时的参数设置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="图文详解：配置Apache+Mysql+PHP开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F03%2Fapache-mysql-php-wamp%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669437.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">图文详解：配置Apache+Mysql+PHP开发环境</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>利用URL重写，在.htaccess中添加下面这段：</p>
<p>RewriteEngine on<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteCond %{REQUEST_FILENAME}\.php -f<br />
RewriteRule ^([^/]+)/$ $1.php</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="10大PHP框架" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669338.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">10大PHP框架</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP6测试版发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F04%2Fphp6%25E6%25B5%258B%25E8%25AF%2595%25E7%2589%2588%25E5%258F%2591%25E5%25B8%2583%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP6测试版发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP上传大文件时的参数设置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP上传大文件时的参数设置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="图文详解：配置Apache+Mysql+PHP开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F03%2Fapache-mysql-php-wamp%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fremove-php-extension-from-url%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669437.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">图文详解：配置Apache+Mysql+PHP开发环境</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2010/08/remove-php-extension-from-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>拒绝垃圾邮件，隐藏email地址</title>
		<link>http://blog.v2op.com/2010/02/e-mail-links-protective-solutions-against-spam/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=e-mail-links-protective-solutions-against-spam</link>
		<comments>http://blog.v2op.com/2010/02/e-mail-links-protective-solutions-against-spam/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 12:25:02 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=529</guid>
		<description><![CDATA[如今的垃圾邮件是越来越猖狂了，稍不小心就会遭致无穷尽的骚扰。尽管有如同Gmail这样的强大的反垃圾邮件的服务商，仍有不少漏网之鱼（每天躺在我收件箱里的垃圾邮件会有几十封）。 我们需要避免直接在网页中留下email地址，例如 test@test.com。下面有一些简单且行之有效的方法隐藏email地址。 方法一：使用图片显示email地址 例如： Google里搜索一下“email图片”类似的关键词，就可以找到有很多网站生成这样的图片 这里有一个：http://www.makepic.com/email.php 方法二：隐藏 @ 符号 使用 &#38;#64; 代替 @，（是@符号的html实体代码）显示出来的效果会是 test@test.com 使用 at 或者其他任意字符 代替 @，例如 test at test.com、test(at)test.com 方法三：使用脚本语言（php或JavaScript）隐藏email地址 代码一：PHP function convert_email_adr&#40;$email&#41; &#123; $pieces = str_split&#40;trim&#40;$email&#41;&#41;; $new_mail = ''; foreach &#40;$pieces as $val&#41; &#123; $new_mail &#8230; <a href="http://blog.v2op.com/2010/02/e-mail-links-protective-solutions-against-spam/">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2Fspam-omnipresent%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">spam无所不在</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F01%2F7-tips-for-the-best-imaging%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">如何发挥一只镜头的最佳成像</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">如何提高邮件的打开率？从邮件主题入手！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2Ftips-for-mail-server-setting%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">邮件服务器设置要点</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>如今的垃圾邮件是越来越猖狂了，稍不小心就会遭致无穷尽的骚扰。尽管有如同Gmail这样的强大的反垃圾邮件的服务商，仍有不少漏网之鱼（每天躺在我收件箱里的垃圾邮件会有几十封）。</p>
<p>我们需要避免直接在网页中留下email地址，例如 test@test.com。下面有一些简单且行之有效的方法隐藏email地址。</p>
<h2>方法一：使用图片显示email地址</h2>
<p>例如：<a href="http://blog.v2op.com/wp-content/uploads/2010/02/fish@email.png"><img class="alignnone size-full wp-image-530" title="fish@email" src="http://blog.v2op.com/wp-content/uploads/2010/02/fish@email.png" alt="" width="189" height="24" /></a></p>
<p>Google里搜索一下“email图片”类似的关键词，就可以找到有很多网站生成这样的图片</p>
<p>这里有一个：http://www.makepic.com/email.php</p>
<h2>方法二：隐藏 @ 符号</h2>
<ul>
<li>使用 &amp;#64; 代替 @，（是@符号的html实体代码）显示出来的效果会是 test@test.com</li>
<li>使用 at 或者其他任意字符 代替 @，例如 test at test.com、test(at)test.com</li>
</ul>
<h2>方法三：使用脚本语言（php或JavaScript）隐藏email地址</h2>
<h3>代码一：PHP</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> convert_email_adr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$email</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$pieces</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_split</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$email</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$new_mail</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pieces</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$new_mail</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&amp;amp;#'</span><span style="color: #339933;">.</span><span style="color: #990000;">ord</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">';'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$new_mail</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>在页面中调用此函数<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> convert_email_adr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'user@email.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p></code><br />
输出结果<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;#117;&amp;#115;&amp;#101;&amp;#114;&amp;#64;&amp;#101;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#46;&amp;#99;&amp;#111;&amp;#109;</pre></div></div>

<p></code></p>
<h3>代码二：JavaScript</h3>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> create_mail<span style="color: #009900;">&#40;</span>naam<span style="color: #339933;">,</span> domain<span style="color: #339933;">,</span> tld<span style="color: #339933;">,</span> label<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> mail<span style="color: #339933;">;</span>
    mail <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;a href=&quot;'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'ma'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'il'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'to:'</span> <span style="color: #339933;">+</span> naam<span style="color: #339933;">;</span>
    mail <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&amp;#64;'</span> <span style="color: #339933;">+</span> mail <span style="color: #339933;">+</span> domain <span style="color: #3366CC;">'.'</span> <span style="color: #339933;">+</span> tld<span style="color: #339933;">;</span>
    mail <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&quot;&gt;'</span> <span style="color: #339933;">+</span> label <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'/a&gt;'</span><span style="color: #339933;">;</span>
    document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>mail<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p></code><br />
在页面中插入此代码调用<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>create_mail<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;user&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;email&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;com&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;e-mail&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p></code></p>
<h3>代码三：</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> hide_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$email</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$character_set</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">'+-.0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_shuffle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$character_set</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$cipher_text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'e'</span><span style="color: #339933;">.</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">999999999</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #0000ff;">&quot;+d+&quot;</span><span style="color: #0000ff;">&quot;'; <span style="color: #006699; font-weight: bold;">$script</span> = &quot;</span><span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span>\<span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span><span style="color: #000099; font-weight: bold;">\\</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'\&quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$script</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>)&quot;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$script</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--mce:2--&gt;&lt;/script&gt;'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;span id=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;[javascript protected email address]&lt;/span&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$script</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>在页面中调用此函数<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> hide_email<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'test@test.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p></code><br />
输出结果<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>span id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;e5119581&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #009900;">&#91;</span>javascript <span style="color: #000000; font-weight: bold;">protected</span> email address<span style="color: #009900;">&#93;</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #666666; font-style: italic;">/*&lt;![CDATA[*/</span><span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;var a=<span style="color: #000099; font-weight: bold;">\&quot;</span>XyScbvBUW38fhasxldY_TQotLE5nCJDkgMVIq@KeArO9i20G1pHu.R4N6PZm7j-+wFz<span style="color: #000099; font-weight: bold;">\&quot;</span>;var b=a.split(<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>).sort().join(<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>);var c=<span style="color: #000099; font-weight: bold;">\&quot;</span>72m7a72m7S9NR<span style="color: #000099; font-weight: bold;">\&quot;</span>;var d=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\&quot;</span>;for(var e=0;e&lt;c.length;e++)d+=b.charAt(a.indexOf(c.charAt(e)));document.getElementById(<span style="color: #000099; font-weight: bold;">\&quot;</span>e5119581<span style="color: #000099; font-weight: bold;">\&quot;</span>).innerHTML=<span style="color: #000099; font-weight: bold;">\&quot;</span>&lt;a href=<span style="color: #000099; font-weight: bold;">\\</span><span style="color: #000099; font-weight: bold;">\&quot;</span>mailto:<span style="color: #000099; font-weight: bold;">\&quot;</span>+d+<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\\</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #000099; font-weight: bold;">\&quot;</span>+d+<span style="color: #000099; font-weight: bold;">\&quot;</span>&lt;/a&gt;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">/*]]&gt;*/</span><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></pre></div></div>

<p></code><br />
显示效果<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">test@test.com</pre></div></div>

<p></code></p>
<p>代码一、代码二<a href="http://www.web-development-blog.com/archives/e-mail-links-protective-solutions-against-spam/">原文点击这里</a><br />
代码三<a href="http://www.maurits.vdschee.nl/php_hide_email/">原文点击这里</a></p>
<p>还有一些其他的方法，例如利用css翻转字符。大家可以自己搜搜看。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2Fspam-omnipresent%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">spam无所不在</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F01%2F7-tips-for-the-best-imaging%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">如何发挥一只镜头的最佳成像</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">如何提高邮件的打开率？从邮件主题入手！</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2Ftips-for-mail-server-setting%2F&from=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">邮件服务器设置要点</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2010/02/e-mail-links-protective-solutions-against-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让Firefox显示无效图片</title>
		<link>http://blog.v2op.com/2009/12/display-broken-image-at-firefox/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=display-broken-image-at-firefox</link>
		<comments>http://blog.v2op.com/2009/12/display-broken-image-at-firefox/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 09:28:44 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[解决方案]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=517</guid>
		<description><![CDATA[FireFox默认隐藏无效图片（broken image），而不是像IE中那般，显示一个红X。 开发人员在coding的时候，难免会遗漏掉这些细节。所以，最好能够让Firefox别那么智能，还是正常显示出无效图片吧。 解决方案： 在C:\Documents and Settings\用户名\Application Data\Mozilla\Firefox\Profiles\不固定字符串.default\chrome，新建一个userContent.css。内容如下： /* *显示缺失图像占位符 */ @-moz-document url-prefix(http), url-prefix(file) { img:-moz-broken { -moz-force-broken-image-icon: 1 !important; width: 24px; height: 24px; } } 重启浏览器即可生效。 补充：使用 Windows 7 的用户请前往 C:\Users\用户名\AppData\Roaming\Mozilla\Firefox\Profiles\不固定字符串.default\chrome<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决方案：某些网页Firefox不能记住密码" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fsolution-of-firefox-cannot-save-password%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决方案：某些网页Firefox不能记住密码</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="升级到Firefox 3 Beta 5" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F05%2F%25E5%258D%2587%25E7%25BA%25A7%25E5%2588%25B0firefox-3-beta-5%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669529.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">升级到Firefox 3 Beta 5</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="我正在使用的firefox扩展" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F11%2F%25E6%2588%2591%25E6%25AD%25A3%25E5%259C%25A8%25E4%25BD%25BF%25E7%2594%25A8%25E7%259A%2584firefox%25E6%2589%25A9%25E5%25B1%2595%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669669.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我正在使用的firefox扩展</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Fsolution-of-dreamweaver-onopen-javascript-error%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669530.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>FireFox默认隐藏无效图片（broken image），而不是像IE中那般，显示一个红X。</p>
<p><img class="alignnone size-full wp-image-518" title="broken-image" src="http://blog.v2op.com/wp-content/uploads/2009/12/broken-image.png" alt="broken-image" width="207" height="82" /></p>
<p>开发人员在coding的时候，难免会遗漏掉这些细节。所以，最好能够让Firefox别那么智能，还是正常显示出无效图片吧。</p>
<p>解决方案：</p>
<p>在C:\Documents and Settings\用户名\Application Data\Mozilla\Firefox\Profiles\不固定字符串.default\chrome，新建一个userContent.css。内容如下：</p>
<p><code>/*<br />
*显示缺失图像占位符<br />
*/<br />
@-moz-document url-prefix(http), url-prefix(file)<br />
{<br />
img:-moz-broken<br />
{<br />
-moz-force-broken-image-icon: 1 !important;<br />
width: 24px;<br />
height: 24px;<br />
}<br />
}</code></p>
<p>重启浏览器即可生效。</p>
<p><span style="color: #0000ff;">补充：使用 Windows 7 的用户请前往 C:\Users\用户名\AppData\Roaming\Mozilla\Firefox\Profiles\不固定字符串.default\chrome<br />
</span></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决方案：某些网页Firefox不能记住密码" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fsolution-of-firefox-cannot-save-password%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决方案：某些网页Firefox不能记住密码</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="升级到Firefox 3 Beta 5" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F05%2F%25E5%258D%2587%25E7%25BA%25A7%25E5%2588%25B0firefox-3-beta-5%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669529.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">升级到Firefox 3 Beta 5</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="我正在使用的firefox扩展" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F11%2F%25E6%2588%2591%25E6%25AD%25A3%25E5%259C%25A8%25E4%25BD%25BF%25E7%2594%25A8%25E7%259A%2584firefox%25E6%2589%25A9%25E5%25B1%2595%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669669.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我正在使用的firefox扩展</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Fsolution-of-dreamweaver-onopen-javascript-error%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fdisplay-broken-image-at-firefox%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669530.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2009/12/display-broken-image-at-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何传递变量给JavaScript</title>
		<link>http://blog.v2op.com/2009/05/%e5%a6%82%e4%bd%95%e4%bc%a0%e9%80%92%e5%8f%98%e9%87%8f%e7%bb%99javascript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e5%25a6%2582%25e4%25bd%2595%25e4%25bc%25a0%25e9%2580%2592%25e5%258f%2598%25e9%2587%258f%25e7%25bb%2599javascript</link>
		<comments>http://blog.v2op.com/2009/05/%e5%a6%82%e4%bd%95%e4%bc%a0%e9%80%92%e5%8f%98%e9%87%8f%e7%bb%99javascript/#comments</comments>
		<pubDate>Fri, 22 May 2009 17:04:50 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=358</guid>
		<description><![CDATA[目前WEB2.0的apps开发中，一个常见的任务就是通过服务端脚本（或者链接）传递变量给JavaScript，从而影响客户端脚本的执行。 不足为奇，有以下几个方法可以实现这个需求。我们来看看它们的优缺点： 在模版中嵌入脚本 通过URLs传递变量 使用配置脚本 1、在模版中嵌入脚本 这是传递变量最简单的方法，嵌入你的js代码在模版或视图文件，或者任何你想从服务端脚本输出的内容。 下面是一个php示例 1 2 3 4 5 6 7 8 9 10 11 12 &#60;code&#62;&#60;html&#62; &#60;head&#62; &#60;script type=&#34;text/javascript&#34;&#62; function onload() { alert('Value from PHP: &#60;?php echo $valueFromPhp; ?&#62;'); } &#60;/script&#62; &#60;/head&#62; &#60;body onload=&#34;onload()&#34;&#62; You'll &#8230; <a href="http://blog.v2op.com/2009/05/%e5%a6%82%e4%bd%95%e4%bc%a0%e9%80%92%e5%8f%98%e9%87%8f%e7%bb%99javascript/">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Fsolution-of-dreamweaver-onopen-javascript-error%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669530.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="chromeexperiments.com" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Fchrome-experiments%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">chromeexperiments.com</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="奥运圣火传递深圳站，为啥我没兴趣？！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F05%2F%25E5%25A5%25A5%25E8%25BF%2590%25E5%259C%25A3%25E7%2581%25AB%25E4%25BC%25A0%25E9%2580%2592%25E6%25B7%25B1%25E5%259C%25B3%25E7%25AB%2599%25EF%25BC%258C%25E4%25B8%25BA%25E5%2595%25A5%25E6%2588%2591%25E6%25B2%25A1%25E5%2585%25B4%25E8%25B6%25A3%25EF%25BC%259F%25EF%25BC%2581%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">奥运圣火传递深圳站，为啥我没兴趣？！</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="小侄子 :)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F07%2F%25E5%25B0%258F%25E4%25BE%2584%25E5%25AD%2590%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669682.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">小侄子 :)</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>目前WEB2.0的apps开发中，一个常见的任务就是通过服务端脚本（或者链接）传递变量给JavaScript，从而影响客户端脚本的执行。<br />
不足为奇，有以下几个方法可以实现这个需求。我们来看看它们的优缺点：</p>
<ul>
<li>在模版中嵌入脚本</li>
<li>通过URLs传递变量</li>
<li>使用配置脚本</li>
</ul>
<p><strong>1、在模版中嵌入脚本</strong></p>
<p>这是传递变量最简单的方法，嵌入你的js代码在模版或视图文件，或者任何你想从服务端脚本输出的内容。</p>
<p>下面是一个php示例</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;code&gt;&lt;html&gt;
 &lt;head&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
   function onload() {
    alert('Value from PHP: &lt;?php echo $valueFromPhp; ?&gt;');
   }
  &lt;/script&gt;
 &lt;/head&gt;
 &lt;body onload=&quot;onload()&quot;&gt;
  You'll get an alert with a value from PHP when this page loads
 &lt;/body&gt;
&lt;/html&gt;&lt;/code&gt;</pre></td></tr></table></div>

<p>示例展示了一个非常简单的函数，只是用来alert一个变量的值。<br />
只要脚本不复杂，用这种方法非常简单，不需要任何js技巧。然而，这种方法不是可复用的代码，因为代码嵌在模版里，你想用在其他地方，只有复制粘贴，复制粘贴&#8230;.（出现大量重复代码，是非常糟糕滴事情 ^__^）</p>
<p><strong>2、通过URLs传递变量</strong></p>
<p>许多服务端脚本通过 GET 或 POST 变量传值给脚本。但是，由于JavaScript的限制，没办法读取POST数据使用。并且也没有任何内置的方法让你很容易的获得GET数据，但，它是可以实现滴。</p>
<p>由于JavaScript可以看到当前网页的完整网址，你可以创建一个脚本从网址中手动解析你想得到的变量。</p>
<p>下面是个简单的从URL中提取参数的函数</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> getQueryParameters<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> query <span style="color: #339933;">=</span> window.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'?'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">//query won't be set if ? isn't in the URL</span>
  <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>query<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #003366; font-weight: bold;">var</span> params <span style="color: #339933;">=</span> query.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&amp;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #003366; font-weight: bold;">var</span> pairs <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> len <span style="color: #339933;">=</span> params.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> len<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> pair <span style="color: #339933;">=</span> params<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'='</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    pairs<span style="color: #009900;">&#91;</span>pair<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> pair<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">return</span> pairs<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>使用上面的函数，你将获得一个js对象，包含URL中的每一个GET参数。和php中的$_GET非常相似。</p>
<p>使用这种js解析URL的好处是你可以做个独立的页面而不需要服务器端的语言设置任何参数。</p>
<p>3、使用配置脚本</p>
<p>这是最先进的方法。有点像第一种方法，因为你需要嵌入一些代码在你的模版中。</p>
<p>有两种类型的配置：</p>
<ul>
<li>使用全局变量，在配置参数的代码中定义一些变量，并&#8230;</li>
<li>通过方法调用配置，</li>
</ul>
<p>如果你用过dojo，你可能熟悉第一种风格，在dojo中，你可以通过创建一个djConfig变量配置一些设置。<br />
第一种方法更容易使用，你的代码将尝试读取用来设置的全局变量，如果它已经定义了。然后这种方法不是没有问题，如你所知，全局变量不是什么好事，它肯定影响其他脚本或者被意外的发生变化。</p>
<p>第二种方法，你需要更多的思考你的js代码，但是它让你的js代码更容易复用和更佳灵活。</p>
<p>基本思想就是让你的代码成为js对象，并允许它创建新的对象实例或通过下面的方式调用对象的函数</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> configurableObject <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
  someFunc<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009966; font-style: italic;">/* does something */</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  setOptions<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009966; font-style: italic;">/* save configurations from config here */</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
configurableObject.<span style="color: #660066;">setOptions</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  foo<span style="color: #339933;">:</span> <span style="color: #3366CC;">'bar'</span><span style="color: #339933;">,</span>
  baz<span style="color: #339933;">:</span> <span style="color: #3366CC;">'asd'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">//Or like this:</span>
<span style="color: #003366; font-weight: bold;">var</span> newableObject <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #009966; font-style: italic;">/* save configurations from config here */</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
newableObject.<span style="color: #660066;">prototype</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
  someFunc<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009966; font-style: italic;">/* does something */</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> newableObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  foo<span style="color: #339933;">:</span> <span style="color: #3366CC;">'bar'</span><span style="color: #339933;">,</span>
  baz<span style="color: #339933;">:</span> <span style="color: #3366CC;">'asd'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>这种方法主要是可以让你的js代码放在一个独立的文件中。在你需要使用的页面包含进来，设置了你所需要的配置。这种代码更容易复用和维护，你可以在任何地方使用它而不依赖于URLs中的变量或全局变量。。。</p>
<p>结论</p>
<p>使用三种方法你可以做相当多的事。第一种方法最简单，适合快速搞定某些事，但是它不够整洁。第二种方法介于第一种和第三种之间，但是它可重复利用性受到了限制。如果你需要重复利用代码，第三种方法最好，但它也是最复杂滴。</p>
<p><a href="http://codeutopia.net/blog/2009/05/22/how-to-pass-variable-values-to-javascript/">via</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Fsolution-of-dreamweaver-onopen-javascript-error%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669530.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决方案:[Dreamweaver]在onLoad运行_onOpen.htm时，发生了以下JavaScript错误</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="chromeexperiments.com" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Fchrome-experiments%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">chromeexperiments.com</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="奥运圣火传递深圳站，为啥我没兴趣？！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F05%2F%25E5%25A5%25A5%25E8%25BF%2590%25E5%259C%25A3%25E7%2581%25AB%25E4%25BC%25A0%25E9%2580%2592%25E6%25B7%25B1%25E5%259C%25B3%25E7%25AB%2599%25EF%25BC%258C%25E4%25B8%25BA%25E5%2595%25A5%25E6%2588%2591%25E6%25B2%25A1%25E5%2585%25B4%25E8%25B6%25A3%25EF%25BC%259F%25EF%25BC%2581%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">奥运圣火传递深圳站，为啥我没兴趣？！</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="iPhone LOMO（Hipstamatic）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F07%2Fiphone-lomo-hipstamatic%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F05%2F%25E5%25A6%2582%25E4%25BD%2595%25E4%25BC%25A0%25E9%2580%2592%25E5%258F%2598%25E9%2587%258F%25E7%25BB%2599javascript%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669317.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">iPhone LOMO（Hipstamatic）</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2009/05/%e5%a6%82%e4%bd%95%e4%bc%a0%e9%80%92%e5%8f%98%e9%87%8f%e7%bb%99javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何提高邮件的打开率？从邮件主题入手！</title>
		<link>http://blog.v2op.com/2009/04/a-good-email-marketing-subject-help-to-improve-open-rates/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-good-email-marketing-subject-help-to-improve-open-rates</link>
		<comments>http://blog.v2op.com/2009/04/a-good-email-marketing-subject-help-to-improve-open-rates/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 16:00:45 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[emailmarketing]]></category>
		<category><![CDATA[邮件营销]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=319</guid>
		<description><![CDATA[最近在帮客户做电子邮件营销方面的事情。从效果上来看，不理想！只有5%左右的打开率。 如何提高邮件的打开率呢？最先想到的就是邮件主题！这是给用户的第一印象。自己平时收信时，很多邮件一看标题就直接删掉或者丢进垃圾箱！在圈子里也做了一些小调研，大致相仿。 碰巧读到一篇关于邮件主题的调研文章，举了一些实例。很有参考价值。如下： 最佳标题（打开率60%-87%） [COMPANYNAME] Sales &#38; Marketing Newsletter Eye on the [COMPANYNAME] Update (Oct 31 &#8211; Nov 4) [COMPANYNAME] Staff Shirts &#38; Photos [COMPANYNAME] May 2005 News Bulletin! [COMPANYNAME] Newsletter &#8211; February 2006 [COMPANYNAME] Newsletter &#8211; January 2006 [ &#8230; <a href="http://blog.v2op.com/2009/04/a-good-email-marketing-subject-help-to-improve-open-rates/">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2Ftips-for-mail-server-setting%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">邮件服务器设置要点</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F08%2Fwordpress%25E6%25B3%25A8%25E5%2586%258C%25E7%259B%25B4%25E6%258E%25A5%25E6%2598%25BE%25E7%25A4%25BA%25E5%25AF%2586%25E7%25A0%2581%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">让WordPress注册时不发邮件，直接显示密码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">拒绝垃圾邮件，隐藏email地址</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F12%2F%25E6%25BC%2582%25E4%25BA%25AE%25E7%259A%2584wordpress%25E4%25B8%25BB%25E9%25A2%2598%25E5%25A3%2581%25E7%25BA%25B8%25EF%25BC%258Cflare%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">漂亮的wordpress主题壁纸，Flare</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>最近在帮客户做<a href="http://baike.baidu.com/view/708461.htm" target="_blank">电子邮件营销</a>方面的事情。从效果上来看，不理想！只有5%左右的打开率。</p>
<p>如何提高邮件的打开率呢？最先想到的就是邮件主题！这是给用户的第一印象。自己平时收信时，很多邮件一看标题就直接删掉或者丢进垃圾箱！在圈子里也做了一些小调研，大致相仿。</p>
<p>碰巧读到一篇关于邮件主题的调研文章，举了一些实例。很有参考价值。如下：</p>
<p><span style="color: #ff0000;"><strong>最佳标题（打开率60%-87%）</strong></span></p>
<ol>
<li>[COMPANYNAME] Sales &amp; Marketing Newsletter</li>
<li>Eye on the [COMPANYNAME] Update (Oct 31 &#8211; Nov 4)</li>
<li>[COMPANYNAME] Staff Shirts &amp; Photos</li>
<li>[COMPANYNAME] May 2005 News Bulletin!</li>
<li>[COMPANYNAME] Newsletter &#8211; February 2006</li>
<li>[COMPANYNAME] Newsletter &#8211; January 2006 [ *|FNAME|* *|LNAME|* ]</li>
<li>[COMPANYNAME] and [COMPANYNAME] Invites You!</li>
<li>Happy Holidays from [COMPANYNAME]</li>
<li>ATTENTION [COMPANYNAME] Staff!</li>
<li>ATTENTION [COMPANYNAME] West Staff!!</li>
<li>Invitation from [COMPANYNAME]</li>
<li>[COMPANYNAME] Jan/Feb 2006 Newsletter</li>
<li>Website news &#8211; Issue 3</li>
<li>Upcoming Events at [COMPANYNAME]</li>
<li>[COMPANYNAME] Councils: Letter of Interest</li>
<li>[COMPANYNAME] Coffee Exchange &#8211; Post-Katrina Update</li>
<li>We&#8217;re Throwing a Party</li>
<li>October 2005 Newsletter</li>
<li>[COMPANYNAME]: 02.10.06</li>
<li>[COMPANYNAME] Racing Newsletter</li>
</ol>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><strong>最差标题（打开率1%-14%）</strong></p>
<ol>
<li>Last Minute Gift &#8211; We Have The Answer</li>
<li>Valentines &#8211; Shop Early &amp; Save 10%</li>
<li>Give a Gift Certificate this Holiday</li>
<li>Valentine&#8217;s Day Salon and Spa Specials!</li>
<li>Gift Certificates &#8211; Easy &amp; Elegant Giving &#8211; Let Them Choose</li>
<li>Need More Advertising Value From Your Marketing Partner?</li>
<li>[COMPANYNAME] Pioneers in Banana Technology</li>
<li>[COMPANYNAME] Moves You Home for the Holidays</li>
<li>Renewal</li>
<li>Technology Company Works with [COMPANYNAME] on Bananas Efforts</li>
<li>[COMPANYNAME] Update &#8211; A Summary of Security and Emergency Preparedness News</li>
<li>Now Offering Banana Services!</li>
<li>It&#8217;s still summer in Tahoe!</li>
<li>[COMPANYNAME] endorses [COMPANYNAME] as successor</li>
<li>[COMPANYNAME] Holiday Sales Event</li>
<li>The Future of International Trade</li>
<li>[COMPANYNAME] for your next dream home.</li>
<li>True automation of your Banana Research</li>
<li>[COMPANYNAME] Resort &#8211; Spring into May Savings</li>
<li>You Asked For More&#8230;</li>
</ol>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>那么，怎样设置标题最佳呢？秘诀就是&#8230;</p>
<blockquote><p><strong>The Secret Formula for Subject-Lines</strong></p>
<p>So what&#8217;s our advice for email subject lines? This is going to sound “stupid simple” to a lot of people, but here goes: Your subject line should (drum roll please): Describe the subject of your email. Yep, that&#8217;s it.</p>
<p>Always set your subscribers&#8217; expectations during the opt-in process about what kinds of emails they&#8217;ll be receiving. Don&#8217;t confuse newsletters with promotions. If your email is a <strong>newsletter</strong>, put the name and issue of the newsletter in your subject line. Because that&#8217;s what&#8217;s inside. If your email is a <strong>special promotion</strong>, tell them what&#8217;s inside. Either way,<strong> just don&#8217;t write your subject lines like advertisements</strong>.</p>
<p>When it comes to <strong>email</strong> marketing, the best subject lines <strong>tell</strong> what&#8217;s inside, and the worst subject lines <strong>sell</strong> what&#8217;s inside.</p></blockquote>
<p><a href="http://www.mailchimp.com/articles/email_marketing_subject_line_comparison/" target="_blank">via</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2Ftips-for-mail-server-setting%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">邮件服务器设置要点</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F08%2Fwordpress%25E6%25B3%25A8%25E5%2586%258C%25E7%259B%25B4%25E6%258E%25A5%25E6%2598%25BE%25E7%25A4%25BA%25E5%25AF%2586%25E7%25A0%2581%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">让WordPress注册时不发邮件，直接显示密码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F02%2Fe-mail-links-protective-solutions-against-spam%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">拒绝垃圾邮件，隐藏email地址</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F12%2F%25E6%25BC%2582%25E4%25BA%25AE%25E7%259A%2584wordpress%25E4%25B8%25BB%25E9%25A2%2598%25E5%25A3%2581%25E7%25BA%25B8%25EF%25BC%258Cflare%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F04%2Fa-good-email-marketing-subject-help-to-improve-open-rates%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">漂亮的wordpress主题壁纸，Flare</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2009/04/a-good-email-marketing-subject-help-to-improve-open-rates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10大PHP框架</title>
		<link>http://blog.v2op.com/2009/03/top-10-php-frameworks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=top-10-php-frameworks</link>
		<comments>http://blog.v2op.com/2009/03/top-10-php-frameworks/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 14:42:48 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=317</guid>
		<description><![CDATA[这是排名前十位的基于MVC设计模式的PHP框架（依据什么排名我不得而知）。 Yii CodeIgniter CakePHP PHPDevShell Akelos Symfony Prado Zend ZooP QPHP via 上述框架我仅用过CakePHP和Zend Framwork。用CakePHP是因为Ruby on Rails（爱屋及乌？），放弃它是因为无法忍受它的龟速（或许现在性能有所改进？）。现在用Zend Framework，性能方面它并没过人之处，很大程度是考虑官方因素（囧）。 我在团队中引入框架，主要目的是增进协作，完善开发规范，做过的东西产品化，避免每个项目每个人各一套代码。 这里分享一篇帖子《PHP框架的繁荣是正确的发展方向吗？》,帖子挺长，讨论的挺详细。值得一看。 这个图有意思，Ruby on Rails火的时候php的框架也到了一个火热期。<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP上传大文件时的参数设置</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2F40%25E4%25B8%25AA%25E8%25BF%25B9%25E8%25B1%25A1%25E8%25A1%25A8%25E6%2598%258E%25E4%25BD%25A0%25E8%25BF%2598%25E6%2598%25AFphp%25E8%258F%259C%25E9%25B8%259F%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">40个迹象表明你还是PHP菜鸟</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F03%2Fapache-mysql-php-wamp%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图文详解：配置Apache+Mysql+PHP开发环境</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F04%2Fphp6%25E6%25B5%258B%25E8%25AF%2595%25E7%2589%2588%25E5%258F%2591%25E5%25B8%2583%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP6测试版发布</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>这是排名前十位的基于<a href="http://zh.wikipedia.org/wiki/MVC" target="_blank">MVC设计模式</a>的PHP框架（依据什么排名我不得而知）。</p>
<ol>
<li><a href="http://www.yiiframework.com/" target="_blank">Yii</a></li>
<li><a href="http://www.codeigniter.com/" target="_blank">CodeIgniter</a></li>
<li><a href="http://www.cakephp.org/" target="_blank">CakePHP</a></li>
<li><a href="http://www.phpdevshell.org/" target="_blank">PHPDevShell</a></li>
<li><a href="http://www.akelos.org/" target="_blank">Akelos</a></li>
<li><a href="http://www.symfony-project.com/" target="_blank">Symfony</a></li>
<li><a href="http://www.pradosoft.com/" target="_blank">Prado</a></li>
<li><a href="http://framework.zend.com/home" target="_blank">Zend</a></li>
<li><a href="http://www.zoopframework.com/" target="_blank">ZooP</a></li>
<li><a href="http://qphp.net/" target="_blank">QPHP</a></li>
</ol>
<p><a href="http://www.one2.biz/blog/top-10-php-frameworks/" target="_blank">via</a></p>
<p>上述框架我仅用过CakePHP和Zend Framwork。用CakePHP是因为<a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a>（爱屋及乌？），放弃它是因为无法忍受它的龟速（或许现在性能有所改进？）。现在用Zend Framework，性能方面它并没过人之处，很大程度是考虑官方因素（囧）。</p>
<p>我在团队中引入框架，主要目的是增进协作，完善开发规范，做过的东西产品化，避免每个项目每个人各一套代码。</p>
<p>这里分享一篇帖子<a href="http://www.javaeye.com/topic/319039" target="_blank">《PHP框架的繁荣是正确的发展方向吗？》</a>,帖子挺长，讨论的挺详细。值得一看。 <img src='http://blog.v2op.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>这个图有意思，Ruby on Rails火的时候php的框架也到了一个火热期。<br />
<img src="http://blog.v2op.com/wp-content/uploads/2009/03/trends-500x275.png" alt="trends" title="trends" width="500" height="275" class="alignnone size-medium wp-image-323" /></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP上传大文件时的参数设置</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2F40%25E4%25B8%25AA%25E8%25BF%25B9%25E8%25B1%25A1%25E8%25A1%25A8%25E6%2598%258E%25E4%25BD%25A0%25E8%25BF%2598%25E6%2598%25AFphp%25E8%258F%259C%25E9%25B8%259F%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">40个迹象表明你还是PHP菜鸟</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F03%2Fapache-mysql-php-wamp%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图文详解：配置Apache+Mysql+PHP开发环境</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F04%2Fphp6%25E6%25B5%258B%25E8%25AF%2595%25E7%2589%2588%25E5%258F%2591%25E5%25B8%2583%2F&from=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Ftop-10-php-frameworks%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP6测试版发布</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2009/03/top-10-php-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>图形文件格式 PPM 介绍</title>
		<link>http://blog.v2op.com/2008/10/ppm/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ppm</link>
		<comments>http://blog.v2op.com/2008/10/ppm/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 06:18:19 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ppm]]></category>
		<category><![CDATA[文件格式]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=229</guid>
		<description><![CDATA[在做的一个项目中需要用到这种文件格式 .ppm 。网上相关的介绍并不多。摘录一篇备忘。 A PPM file consists of two parts, a header and the image data. The header consists of at least three parts normally delinineated by carriage returns and/or linefeeds but the PPM specification only requires white space. The &#8230; <a href="http://blog.v2op.com/2008/10/ppm/">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="PHP上传大文件时的参数设置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP上传大文件时的参数设置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="信息过载" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F06%2F%25E4%25BF%25A1%25E6%2581%25AF%25E8%25BF%2587%25E8%25BD%25BD%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669502.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">信息过载</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="力荐！钢铁侠 Iron Man (2008)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F05%2F%25E5%258A%259B%25E8%258D%2590%25EF%25BC%2581%25E9%2592%25A2%25E9%2593%2581%25E4%25BE%25A0-iron-man-2008%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669672.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">力荐！钢铁侠 Iron Man (2008)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="七夕" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F08%2Fqixi%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七夕</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在做的一个项目中需要用到这种文件格式 .ppm 。网上相关的介绍并不多。摘录一篇备忘。</p>
<p>A PPM file consists of two parts, a header and the image data. The header consists of at least three parts normally delinineated by carriage returns and/or linefeeds but the PPM specification only requires white space. The first “line” is a magic PPM identifier, it can be “P3&#8243; or “P6&#8243; (not including the double quotes!). The next line consists of the width and height of the image as ascii numbers. The last part of the header gives the maximum value of the colour components for the pixels, this allows the format to describe more than single byte (0..255) colour values. In addition to the above required lines, a comment can be placed anywhere with a “#” character, the comment extends to the end of the line.</p>
<p>The following are all valid PPM headers.</p>
<p><strong>Header example 1</strong><br />
<span style="color: #008000;"> P6 1024 788 255</span></p>
<p><strong>Header example 2</strong><br />
<span style="color: #008000;">P6<br />
1024 788<br />
# A comment<br />
255</span></p>
<p><strong>Header example 3</strong><br />
<span style="color: #008000;">P3<br />
1024 # the image width<br />
788 # the image height<br />
# A comment<br />
1023</span></p>
<p>The format of the image data itself depends on the magic PPM identifier. If it is “P3&#8243; then the image is given as ascii text, the numerical value of each pixel ranges from 0 to the maximum value given in the header. The lines should not be longer than 70 characters.</p>
<p><strong>PPM example 4</strong><br />
<span style="color: #008000;">P3<br />
# example from the man page<br />
4 4<br />
15<br />
0  0  0    0  0  0    0  0  0   15  0 15<br />
0  0  0    0 15 7    0  0  0    0  0  0<br />
0  0  0    0  0  0    0 15  7   0  0  0<br />
15  0 15   0  0  0    0  0  0   0  0  0</span></p>
<p>If the PPM magic identifier is “P6&#8243; then the image data is stored in byte format, one byte per colour component (r,g,b). Comments can only occur before the last field of the header and only one byte may appear after the last header field, normally a carriage return or line feed. “P6&#8243; image files are obviously smaller than “P3&#8243; and much faster to read. Note that “P6&#8243; PPM files can only be used for single byte colours.</p>
<p>While not required by the format specification it is a standard convention to store the image in top to bottom, left to right order. Each pixel is stored as a byte, value 0 == black, value 255 == white. The components are stored in the “usual” order, red &#8211; green &#8211; blue.</p>
<p><a href="http://zh.wikipedia.org/w/index.php?title=%E5%9B%BE%E5%BD%A2%E6%96%87%E4%BB%B6%E6%A0%BC%E5%BC%8F%E5%88%97%E8%A1%A8&amp;variant=zh-cn">图形文件格式列表</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="PHP上传大文件时的参数设置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2010%2F08%2Fupload-large-files-in-php%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP上传大文件时的参数设置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Happy birthday to me！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F12%2Fhappy-birthday-to-me%25EF%25BC%2581%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669490.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Happy birthday to me！</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="年轮" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F03%2Fgrowth-ring%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669684.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">年轮</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="好日子！08年08月08日08时08分08秒0.888毫秒" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F08%2F%25E5%25A5%25BD%25E6%2597%25A5%25E5%25AD%2590%25EF%25BC%258108%25E5%25B9%25B408%25E6%259C%258808%25E6%2597%25A508%25E6%2597%25B608%25E5%2588%258608%25E7%25A7%25920888%25E6%25AF%25AB%25E7%25A7%2592%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F10%2Fppm%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669544.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">好日子！08年08月08日08时08分08秒0.888毫秒</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2008/10/ppm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>每个web程序员都应该知道的5个正则表达式</title>
		<link>http://blog.v2op.com/2008/09/5-regular-expressions-every-web-programmer-should-know/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=5-regular-expressions-every-web-programmer-should-know</link>
		<comments>http://blog.v2op.com/2008/09/5-regular-expressions-every-web-programmer-should-know/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 17:24:28 +0000</pubDate>
		<dc:creator>AmirFish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[正则表达式 regular]]></category>

		<guid isPermaLink="false">http://blog.v2op.com/?p=216</guid>
		<description><![CDATA[1、匹配用户名 规则： 允许字符和数字（a-z，A-Z，0-9） 允许下划线 正则表达式： /^[a-zA-Z0-9_]{3,16}$/ 代码示例： function validate_username( $username ) { if(preg_match(&#8216;/^[a-zA-Z0-9_]{3,16}$/&#8217;, $_GET['username'])) { return true; } return false; } 2、匹配XHTML或XML标签 正则表达式： {]*&#62;(.*?)} 代码示例： function get_tag( $tag, $xml ) { $tag = preg_quote($tag); preg_match_all(&#8216;{]*>(.*?).&#8217;}', $xml, $matches, PREG_PATTERN_ORDER); return $matches[1]; &#8230; <a href="http://blog.v2op.com/2008/09/5-regular-expressions-every-web-programmer-should-know/">Continue reading <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="针对Web系统常用的功能测试方法浅析" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F07%2F%25E9%2592%2588%25E5%25AF%25B9web%25E7%25B3%25BB%25E7%25BB%259F%25E5%25B8%25B8%25E7%2594%25A8%25E7%259A%2584%25E5%258A%259F%25E8%2583%25BD%25E6%25B5%258B%25E8%25AF%2595%25E6%2596%25B9%25E6%25B3%2595%25E6%25B5%2585%25E6%259E%2590%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">针对Web系统常用的功能测试方法浅析</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="我正在使用的firefox扩展" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F11%2F%25E6%2588%2591%25E6%25AD%25A3%25E5%259C%25A8%25E4%25BD%25BF%25E7%2594%25A8%25E7%259A%2584firefox%25E6%2589%25A9%25E5%25B1%2595%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669669.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我正在使用的firefox扩展</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="本月书单：巴菲特集体智慧编程，激荡三十年走出软件作坊" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F02%2Fbooklist-of-february-2009%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669453.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">本月书单：巴菲特集体智慧编程，激荡三十年走出软件作坊</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="UE+架构设计+企业文化+服务器架设" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F12%2Fue%25E6%259E%25B6%25E6%259E%2584%25E8%25AE%25BE%25E8%25AE%25A1%25E4%25BC%2581%25E4%25B8%259A%25E6%2596%2587%25E5%258C%2596%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8%25E6%259E%25B6%25E8%25AE%25BE%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">UE+架构设计+企业文化+服务器架设</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p><strong>1、匹配用户名</strong></p>
<p>规则：</p>
<ul>
<li>允许字符和数字（a-z，A-Z，0-9）</li>
<li>允许下划线</li>
</ul>
<p>正则表达式：</p>
<blockquote><p>/^[a-zA-Z0-9_]{3,16}$/</p></blockquote>
<p>代码示例：</p>
<blockquote><p>function validate_username( $username ) {<br />
if(preg_match(&#8216;/^[a-zA-Z0-9_]{3,16}$/&#8217;, $_GET['username'])) {<br />
return true;<br />
}<br />
return false;<br />
}</p></blockquote>
<p><strong>2、匹配XHTML或XML标签</strong></p>
<p>正则表达式：</p>
<blockquote><p>{]*&gt;(.*?)}</p></blockquote>
<p>代码示例：</p>
<blockquote><p>function get_tag( $tag, $xml ) {<br />
  $tag = preg_quote($tag);<br />
  preg_match_all(&#8216;{<'.$tag.'[^>]*>(.*?)</'.$tag.'>.&#8217;}',<br />
                   $xml,<br />
                   $matches,<br />
                   PREG_PATTERN_ORDER);</p>
<p>  return $matches[1];<br />
}</p></blockquote>
<p><strong>3、匹配确定属性值的XHTML或XML标签（例如：class或tag）</strong></p>
<p>正则表达式：</p>
<blockquote><p>{]*attribute\\s*=\\s*(["'])value\\\\1[^&gt;]*&gt;(.*?)}</p></blockquote>
<p>代码示例：</p>
<blockquote><p>function get_tag( $attr, $value, $xml, $tag=null ) {<br />
  if( is_null($tag) )<br />
    $tag = &#8216;\\w+&#8217;;<br />
  else<br />
    $tag = preg_quote($tag);</p>
<p>  $attr = preg_quote($attr);<br />
  $value = preg_quote($value);</p>
<p>  $tag_regex = “/<(".$tag.")[^>]*$attr\\s*=\\s*”.<br />
                “(['\\"])$value\\\\2[^>]*>(.*?)<\\/\\\\1>/”</p>
<p>  preg_match_all($tag_regex,<br />
                 $xml,<br />
                 $matches,<br />
                 PREG_PATTERN_ORDER);</p>
<p>  return $matches[3];<br />
}</p></blockquote>
<p><strong>4、匹配和解析email地址</strong></p>
<p>代码示例（比较复杂些）：</p>
<blockquote><p>function is_valid_email_address($email){<br />
  $qtext = &#8216;[^\\x0d\\x22\\x5c\\x80-\\xff]&#8216;;<br />
  $dtext = &#8216;[^\\x0d\\x5b-\\x5d\\x80-\\xff]&#8216;;<br />
  $atom = &#8216;[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c'.<br />
                  '\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+&#8217;;<br />
  $quoted_pair = &#8216;\\x5c[\\x00-\\x7f]&#8216;;<br />
  $domain_literal = “\\x5b($dtext|$quoted_pair)*\\x5d”;<br />
  $quoted_string = “\\x22($qtext|$quoted_pair)*\\x22&#8243;;<br />
  $domain_ref = $atom;<br />
  $sub_domain = “($domain_ref|$domain_literal)”;<br />
  $word = “($atom|$quoted_string)”;<br />
  $domain = “$sub_domain(\\x2e$sub_domain)*”;<br />
  $local_part = “$word(\\x2e$word)*”;<br />
  $addr_spec = “$local_part\\x40$domain”;</p>
<p>  return preg_match(“!^$addr_spec$!”, $email) ? 1 : 0;<br />
}</p></blockquote>
<p><strong>5、匹配URL</strong></p>
<p>正则表达式：</p>
<blockquote><p>{<br />
\\b<br />
# Match the leading part (proto://hostname, or just hostname)<br />
(<br />
# http://, or https:// leading part<br />
(https?)://[-\\w]+(\\.\\w[-\\w]*)+<br />
|<br />
# or, try to find a hostname with more specific sub-expression<br />
(?i: [a-z0-9] (?:[-a-z0-9]*[a-z0-9])? \\. )+ # sub domains<br />
# Now ending .com, etc. For these, require lowercase<br />
(?-i: com\\b<br />
| edu\\b<br />
| biz\\b<br />
| gov\\b<br />
| in(?:t|fo)\\b # .int or .info<br />
| mil\\b<br />
| net\\b<br />
| org\\b<br />
| [a-z][a-z]\\.[a-z][a-z]\\b # two-letter country code<br />
)<br />
)</p>
<p># Allow an optional port number<br />
( : \\d+ )?</p>
<p># The rest of the URL is optional, and begins with /<br />
(<br />
/<br />
# The rest are heuristics for what seems to work well<br />
[^.!,?;"\\'&lt;&gt;()\[\]\{\}\s\x7F-\\xFF]*<br />
(<br />
[.!,?]+ [^.!,?;"\\'&lt;&gt;()\\[\\]\{\\}\s\\x7F-\\xFF]+<br />
)*<br />
)?<br />
}ix</p></blockquote>
<p>完整的文章请<a href="http://immike.net/blog/2007/04/06/5-regular-expressions-every-web-programmer-should-know/" target=“_blank”>访问这里阅读（英文）</a></p>
<p style="margin:0;padding:0;height:1px;overflow:hidden;">
    <script type="text/javascript"><!--
        var wumiiSitePrefix = "http://blog.v2op.com";
        var wumiiEnableCustomPos = false;
        var wumiiParams = "&#038;num=4&#038;mode=3&#038;displayInFeed=1&#038;version=1.0.5.5&#038;pf=WordPress3.3.1";
    //--></script><script type="text/javascript" src="http://widget.wumii.com/ext/relatedItemsWidget.htm"></script><a href="http://www.wumii.com/widget/relatedItems.htm" style="border:0;"><img src="http://static.wumii.com/images/pixel.png" alt="无觅相关文章插件，快速提升流量" style="border:0;padding:0;margin:0;" /></a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="针对Web系统常用的功能测试方法浅析" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2008%2F07%2F%25E9%2592%2588%25E5%25AF%25B9web%25E7%25B3%25BB%25E7%25BB%259F%25E5%25B8%25B8%25E7%2594%25A8%25E7%259A%2584%25E5%258A%259F%25E8%2583%25BD%25E6%25B5%258B%25E8%25AF%2595%25E6%2596%25B9%25E6%25B3%2595%25E6%25B5%2585%25E6%259E%2590%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">针对Web系统常用的功能测试方法浅析</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="我正在使用的firefox扩展" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F11%2F%25E6%2588%2591%25E6%25AD%25A3%25E5%259C%25A8%25E4%25BD%25BF%25E7%2594%25A8%25E7%259A%2584firefox%25E6%2589%25A9%25E5%25B1%2595%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669669.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我正在使用的firefox扩展</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="本月书单：巴菲特集体智慧编程，激荡三十年走出软件作坊" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2009%2F02%2Fbooklist-of-february-2009%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/11/2669453.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">本月书单：巴菲特集体智慧编程，激荡三十年走出软件作坊</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="UE+架构设计+企业文化+服务器架设" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.v2op.com%2F2007%2F12%2Fue%25E6%259E%25B6%25E6%259E%2584%25E8%25AE%25BE%25E8%25AE%25A1%25E4%25BC%2581%25E4%25B8%259A%25E6%2596%2587%25E5%258C%2596%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8%25E6%259E%25B6%25E8%25AE%25BE%2F&from=http%3A%2F%2Fblog.v2op.com%2F2008%2F09%2F5-regular-expressions-every-web-programmer-should-know%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">UE+架构设计+企业文化+服务器架设</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.v2op.com/2008/09/5-regular-expressions-every-web-programmer-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

