<?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>Kej.tw Revisited &#187; tips</title>
	<atom:link href="http://blog.kej.tw/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kej.tw</link>
	<description>一個懶鬼的部落格</description>
	<lastBuildDate>Wed, 27 Apr 2022 20:02:14 +0000</lastBuildDate>
	<language>zh-TW</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.3</generator>
	<item>
		<title>在Firefox 1.5 上執行舊extensions的簡單方法</title>
		<link>http://blog.kej.tw/2005-12/06/firefox15-work-with-old-extensions/</link>
		<comments>http://blog.kej.tw/2005-12/06/firefox15-work-with-old-extensions/#comments</comments>
		<pubDate>Tue, 06 Dec 2005 15:23:38 +0000</pubDate>
		<dc:creator><![CDATA[Kej]]></dc:creator>
				<category><![CDATA[電腦網路]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.kej.tw/2005-12/06/firefox15-work-with-old-extensions/</guid>
		<description><![CDATA[在Scattered看到的，教你如何在Firefox 1.5上執行1.0的extensions 只要幾個簡單的 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>在<a href="http://dancameron.org/archives/903/modify-firefox-15-to-work-with-all-extensions/">Scattered</a>看到的，教你如何在Firefox 1.5上執行1.0的extensions</p>
<p>只要幾個簡單的步驟：<br />
1. 在網址列上輸入 <code>about:config</code><br />
2. 在列表上按右鍵，選新增→字串，在「輸入設定名稱」填入<code>app.extensions.version</code><br />
3. 在值的部份填入<code>1.0</code><br />
4. 重新開啟Firefox 1.5 ，然後啟用你想要用的extensions<br />
5. 再重新啟動一次Firefox 1.5 ，就OK啦！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kej.tw/2005-12/06/firefox15-work-with-old-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>定時自動備份WordPress資料庫</title>
		<link>http://blog.kej.tw/2005-10/12/wordpress_auto-backup/</link>
		<comments>http://blog.kej.tw/2005-10/12/wordpress_auto-backup/#comments</comments>
		<pubDate>Wed, 12 Oct 2005 13:55:50 +0000</pubDate>
		<dc:creator><![CDATA[Kej]]></dc:creator>
				<category><![CDATA[電腦網路]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.kejjang.com/2005-10/12/wordpress_auto-backup/</guid>
		<description><![CDATA[使用 WP-Cron + WP-DB-Backup 自動備份你的WordPress資料庫]]></description>
				<content:encoded><![CDATA[<p>在<a href="http://www.lifehut.org/">LifeHut</a>上看到這篇<a href="http://www.lifehut.org/2005/08/17/wordpress-google-killer-combo/">WordPress + Google = Killer Combo</a>，實際上就是用兩個Plugin：<a href="http://www.skippy.net/blog/category/wordpress/plugins/wp-cron/">WP-Cron</a>以及<a href="http://www.skippy.net/blog/category/wordpress/plugins/wp-db-backup/">WP-DB-Backup</a>定時將資料庫備份寄到你的Email；雖然文章裡是以GMail為主，不過理論上應該是任何Email都可以用，以GMail為首選的原因其實就是容量比較大而已。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kej.tw/2005-10/12/wordpress_auto-backup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP設定錯誤回報等級</title>
		<link>http://blog.kej.tw/2005-10/09/php_error_reporting/</link>
		<comments>http://blog.kej.tw/2005-10/09/php_error_reporting/#comments</comments>
		<pubDate>Sun, 09 Oct 2005 11:46:51 +0000</pubDate>
		<dc:creator><![CDATA[Kej]]></dc:creator>
				<category><![CDATA[程式設計]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.kejjang.com/?p=4</guid>
		<description><![CDATA[用error_reporting()函式來自訂錯誤回報的等級，以取得所有的錯誤/警告/注意信息]]></description>
				<content:encoded><![CDATA[<p>開始寫PHP以來，就對一個小地方很感冒，就是PHP並沒有禁止使用未宣告或初始化過的變數，也沒有提出警告。大概是因為自己也算是個容易粗心大意的人吧，所以有時候會不小心將變數名稱key錯了或怎麼的，整個程式便跑出了奇怪、非預期的結果。這時要debug是非常吃力的一件事情，不禁讓我懷念起perl的use strict。</p>
<p>不過後來發現，這其實是PHP預設將注意信息(NOTICE)隱藏起來而已，因為會引起這些注意信息的錯誤(例如某變數未初始化)，並不會導致致命的結果，所以我們可以用error_reporting()函式來自訂錯誤回報的等級。</p>
<p>一般PHP預設值是7或2039，也就是<strong>E_ALL &#038; ~E_NOTICE</strong>(php.ini的寫法) 或 <strong>E_ALL ^ E_NOTICE</strong>(error_reporting函式內參數的寫法，我沒試過能不能混用，我懶嘛)。因此若是在程式內設定<strong>error_reporting(E_ALL)</strong>，便可以取得所有的錯誤 /警告 /注意信息，對於神經比較大條的程式設計師來說，debug就方便多了。當然程式完成之後，你也可以用<strong>error_reporting(0)</strong>來抑制所有錯誤警告，畢竟這些訊息是不需要給使用者看到的吧(呃，當然，如果你確定程式百分之百不會出錯的話)。</p>
<p>p.s.</p>
<ol style='margin-top:-10px'>
<li>在參數的使用上，應該儘可能使用E_ALL、E_WARNING等常數，盡量不要使用數字，以避免新版本的數字跟常數的定義規則發生變化。</li>
<li>當然，使用ini_set(&#8216;error_reporting&#8217;,E_ALL) 也能達到與error_reporting(E_ALL) 一樣的效果，不過為什麼要自找麻煩呢？ <img src="http://blog.kej.tw/wp-includes/images/smilies/icon_razz.gif" alt=":P" class="wp-smiley" />  </li>
</ol>
<p>參考：<a href="http://tw2.php.net/manual/tw/function.error-reporting.php">error_reporting()</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kej.tw/2005-10/09/php_error_reporting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
