<?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>Geek is a Lift-Style. &#187; 原創</title>
	<atom:link href="http://www.taiwangeek.com/category/%e5%8e%9f%e5%89%b5/feed" rel="self" type="application/rss+xml" />
	<link>http://www.taiwangeek.com</link>
	<description>Time has a wonderful way of showing us what really matters.</description>
	<lastBuildDate>Mon, 23 May 2011 07:18:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>Gatorhost pdo don&#8217;t support sqlite3</title>
		<link>http://www.taiwangeek.com/2011-05/gatorhost-pdo-dont-support-sqlite3.html</link>
		<comments>http://www.taiwangeek.com/2011-05/gatorhost-pdo-dont-support-sqlite3.html#comments</comments>
		<pubDate>Mon, 23 May 2011 07:08:48 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[原創]]></category>
		<category><![CDATA[gatorhost]]></category>
		<category><![CDATA[pdo_sqlite]]></category>
		<category><![CDATA[sqlite3]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=6432</guid>
		<description><![CDATA[Greetings,
The sqlite PDO extension appears to be loaded properly. However, it appears that the extension supports sqlite2, but not sqlite3. Currently, I see the use of sqlite3 in your scripts. You will need to use sqlite2 instead in order for them to work properly. I apologize for the inconvenience.

Please feel free to ask if you need anything else at all.]]></description>
			<content:encoded><![CDATA[<p>As title </p>
<blockquote><p>
Greetings,<br />
The sqlite PDO extension appears to be loaded properly. However, it appears that the extension supports sqlite2, but not sqlite3. Currently, I see the use of sqlite3 in your scripts. You will need to use sqlite2 instead in order for them to work properly. I apologize for the inconvenience.</p>
<p>Please feel free to ask if you need anything else at all.
</p></blockquote>
<p>But I got a solution ~~<br />
1.</p>
<pre class="brush:shell">
cp -rf /opt/php53/lib/php/extensions/no-debug-non-zts-20090626/* ext/
</pre>
<p>2.conpile the pdo_sqlite.so by your self convert the ext/pdo_sqlite.so</p>
<p>3. change extension_dir in php.ini to the .so file you made.</p>
<pre class="brush:shell">
extension_dir = "/home/xxx/ext"
</pre>
<p>yes all done~~<br />
Something come from here (http://forums.hostgator.com/php-5-3-support-t100928.html)<br />
Hello,</p>
<p>We currently offer PHP 5.3 support on our shared servers as an addition with PHP 5.2.  In order to utilize PHP 5.3 on your domain, place the following code inside the document roots .htaccess file:</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 520px; height: 50px; text-align: left; overflow: auto;">Action application/x-hg-php53 /cgi-sys/php53
AddType application/x-httpd-php53 .php</pre>
</div>
<p>
Thanks Richard for the below information:</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Quote:</div>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tbody>
<tr>
<td class="alt2" style="border: 1px inset;">
<p>				CAUTION: For those who use the cPanel &#8220;QuickConfig&#8221; feature, it should be noted that it works by putting a php.ini copy into the /home/username/ folder and setting the suPHP_ConfigPath in your primary .htaccess file to point to that copy.</p>
<p>Because the &#8220;QuickConfig&#8221; php.ini copy is originally based on the php.ini file that is installed as part of the server&#8217;s setup for its default PHP version, there may be serious problems if the user subsequently decides to use some other PHP version. The php.ini copy pointed to by the suPHP_ConfigPath that &#8220;QuickConfig&#8221; sets may contain configuration paths, extensions and other settings that are not suitable for a PHP version that is chosen thereafter. It may even be missing some settings required by the newer version entirely.</p>
<p>As just one of many examples of problems that can thus arise, the PHP 5.3 option discussed by GatorJacob as the topic of this thread differs from PHP 5.2 in the server path that is used for its extension modules &#8211;<br />
PHP 5.2: extension_dir = &#8220;/usr/local/lib/php/extensions/no-debug-non-zts-20060613&#8243;<br />
PHP 5.3: extension_dir = &#8220;/opt/php53/lib/php/extensions/no-debug-non-zts-20090626&#8243;</p>
<p>So, if you&#8217;ve used cPanel&#8217;s &#8220;QuickConfig&#8221; to set up or modify your PHP configuration, get rid of its php.ini copy and the suPHP_ConfigPath pointer to it that &#8220;QuickConfig&#8221; puts in your primary .htaccess file before implementing any PHP version change!</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>Here is a generic fix for the TZ issue</p>
<p>PHP Code:</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 520px; height: 98px; text-align: left; overflow: auto;">// Force PHP 5.3.0+ to take time zone information from OS
if (version_compare(phpversion(), '5.3.0', '&gt;='))
{
    @date_default_timezone_set(date_default_timezone_get());
}</pre>
</div>
<p>Please do let us know if you see any problems</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2011-05/gatorhost-pdo-dont-support-sqlite3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>use curl to got Content-Disposition filename</title>
		<link>http://www.taiwangeek.com/2011-01/use-curl-to-got-content-disposition-filename.html</link>
		<comments>http://www.taiwangeek.com/2011-01/use-curl-to-got-content-disposition-filename.html#comments</comments>
		<pubDate>Mon, 10 Jan 2011 03:42:12 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php curl]]></category>
		<category><![CDATA[原創]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=5655</guid>
		<description><![CDATA[curl CURLOPT_BINARYTRANSFER can't not got Content-Disposition filename for u]]></description>
			<content:encoded><![CDATA[<pre class="brush:php">/*
* usage:
=================================================
$fn = CurlTool::downloadFile('http://aaabb.com/download.php?id=zzzaaa','./');
echo "Grab file path =",$fn,"\n";
var_dump(CurlTool::$attach_info);
*/
class CurlTool {
    public static $userAgents = array(
        'FireFox3' =&gt; 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0',
        'GoogleBot' =&gt; 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
        'IE7' =&gt; 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)',
        'Netscape' =&gt; 'Mozilla/4.8 [en] (Windows NT 6.0; U)',
        'Opera' =&gt; 'Opera/9.25 (Windows NT 6.0; U; en)'
        );
    public static $options = array(
        CURLOPT_USERAGENT =&gt; 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)',
        CURLOPT_AUTOREFERER =&gt; true,
        CURLOPT_COOKIEFILE =&gt; '',
        CURLOPT_FOLLOWLOCATION =&gt; true
        );
    public static $header = array();
    public static $attach_info = array();

    private static $proxyServers = array();
    private static $proxyCount = 0;
    private static $currentProxyIndex = 0;

    public static function addProxyServer($url) {
        self::$proxyServers[] = $url;
        ++self::$proxyCount;
    }

    public static function fetchContent($url, $verbose = false,$url_reffer=false) {
        if (($curl = curl_init($url)) == false) {
            throw new Exception("curl_init error for url $url.");
        }

        if (self::$proxyCount &gt; 0) {
            $proxy = self::$proxyServers[self::$currentProxyIndex++ % self::$proxyCount];
            curl_setopt($curl, CURLOPT_PROXY, $proxy);
            if ($verbose === true) {
                echo "Reading $url [Proxy: $proxy] ... ";
            }
        } else if ($verbose === true) {
            echo "Reading $url ... ";
        }

        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt_array($curl, self::$options);
        if (is_string($url_reffer)) {
            curl_setopt($curl,CURLOPT_REFERER,$url_reffer);
        }
        $content = curl_exec($curl);
        if ($content === false) {
            throw new Exception("curl_exec error for url $url.");
        }
       	self::$header = curl_getinfo($curl);
        curl_close($curl);
        if ($verbose === true) {
            echo "Done.\n";
        }
        return $content;
    }

    public static function downloadFile($url, $fileName, $verbose = false) {
        if (($curl = curl_init($url)) == false) {
            throw new Exception("curl_init error for url $url.");
        }

        if (self::$proxyCount &gt; 0) {
            $proxy = self::$proxyServers[self::$currentProxyIndex++ % self::$proxyCount];
            curl_setopt($curl, CURLOPT_PROXY, $proxy);
            if ($verbose === true) {
                echo "Downloading $url [Proxy: $proxy] ... ";
            }
        } else if ($verbose === true) {
            echo "Downloading $url ... ";
        }

        curl_setopt_array($curl, self::$options);

        if (substr($fileName, -1) == '/') {
            $targetDir = $fileName;
            $fileName = tempnam(sys_get_temp_dir(), 'c_');
        }
        if (($fp = fopen($fileName, "wb")) === false) {
            throw new Exception("fopen error for filename $fileName");
        }
        curl_setopt($curl, CURLOPT_FILE, $fp);
		curl_setopt($curl,CURLOPT_HEADERFUNCTION,'self::get_att');
        curl_setopt($curl, CURLOPT_BINARYTRANSFER, true);
        if (curl_exec($curl) === false) {
            fclose($fp);
            unlink($fileName);
            throw new Exception("curl_exec error for url $url.");
        } elseif (isset($targetDir)) {
            $eurl = curl_getinfo($curl, CURLINFO_EFFECTIVE_URL);
            preg_match('#^.*/(.+)$#', $eurl, $match);
            fclose($fp);
            rename($fileName, "$targetDir{$match[1]}");
            $fileName = "$targetDir{$match[1]}";
        } else {
            fclose($fp);
        }
		self::$header = curl_getinfo($curl);
        curl_close($curl);
        if ($verbose === true) {
            echo "Done.\n";
        }
        return $fileName;
    }

	public static function get_att($ch, $header){
		if (preg_match("/Content-Length: (\d*)/i",$header,$matches)) {
			self::$attach_info['size'] = $matches[1];
		} elseif (preg_match('/Content-Disposition:.*?filename="(.*)"/i',$header,$matches)) {
			self::$attach_info['filename'] = $matches[1];
		} elseif (preg_match("/Content-Type: ([^; ]*)/i",$header,$matches)) {
			self::$attach_info['type'] = $matches[1];
		}
		//echo "$header";
		return strlen($header);
	}
    // activates POST and set post data
    public static function addPostData($data) {
        self::$options[CURLOPT_POST] = true;
        self::$options[CURLOPT_POSTFIELDS] = $data;
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2011-01/use-curl-to-got-content-disposition-filename.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[php-editor] USE PHP_Beautifier in Notepad++</title>
		<link>http://www.taiwangeek.com/2010-08/php-editor-use-php_beautifier-in-notepad.html</link>
		<comments>http://www.taiwangeek.com/2010-08/php-editor-use-php_beautifier-in-notepad.html#comments</comments>
		<pubDate>Wed, 18 Aug 2010 08:18:23 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[原創]]></category>
		<category><![CDATA[notepad++]]></category>
		<category><![CDATA[PHP-Beautifier]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=1329</guid>
		<description><![CDATA[This is the way to use PHP_Beautifier to formate php in notepad++ and output to clipboard Install PHP_Beautifier via http://pear.php.net/package/PHP_Beautifier Make sure your notepad++ have NPPExec Add Execute like this... <a class="meta-more" href="http://www.taiwangeek.com/2010-08/php-editor-use-php_beautifier-in-notepad.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>This is the way to use PHP_Beautifier to formate php in notepad++ and output to clipboard</h3>
<ul>
<li>Install PHP_Beautifier via http://pear.php.net/package/PHP_Beautifier</li>
<li>Make sure your notepad++ have NPPExec</li>
<p>Add Execute like this</p>
<pre class="brush:shell">&lt;%php_beautifier path%&gt;\php_beautifier.bat  $(FULL_CURRENT_PATH) | clip</pre>
<p>the formate output will save to clipboard</p>
<li>IF your php file is utf-8 ,edit your php_beautifier.bat like below<br />
ps,<strong>chcp 65001</strong> force output encode utf-8</li>
<pre class="brush:shell">@ECHO OFF
chcp 65001
SET PHP="\xampp\php\php.exe"
SET BEAUTIFY="\xampp\php"\php_beautifier
%PHP% -d output_buffering=1 -f %BEAUTIFY% -- %1 %2 %3 %4 %5 %6 %7 %8 %9
@ECHO ON
</pre>
</ul>
<p>Relate article form web</p>
<ul>
<li>http://weblogs.asp.net/owscott/archive/2006/12/15/clip-saving-command-line-and-powershell-output-directly-to-the-clipboard.aspx</li>
<li>http://jdev.tw/blog/1651/dos-tips-clip-exe</li>
<li>http://php.apsique.com/PHP_Beautifier/PHP_Beautifier/tutorial_PHP_Beautifier.howtouse.commandline.pkg.html</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-08/php-editor-use-php_beautifier-in-notepad.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP::PDO]SQLITE Drop Columns function</title>
		<link>http://www.taiwangeek.com/2010-08/phppdosqlite-drop-columns-function.html</link>
		<comments>http://www.taiwangeek.com/2010-08/phppdosqlite-drop-columns-function.html#comments</comments>
		<pubDate>Tue, 17 Aug 2010 06:57:22 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[原創]]></category>
		<category><![CDATA[DROP-COLUMN]]></category>
		<category><![CDATA[SQLITE]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=1317</guid>
		<description><![CDATA[//CODE DEMO $dbh = new PDO('sqlite:ClientFB.sqlite3'); $st = $dbh-&#62;query("PRAGMA table_info(ap_form_elements)"); var_dump($st-&#62;fetchAll(PDO::FETCH_COLUMN,1)); sqlite_drop_table_columns('ap_form_elements',array('element_position','element_default_value'),$dbh); $st = $dbh-&#62;query("PRAGMA table_info(ap_form_elements)"); var_dump($st-&#62;fetchAll(PDO::FETCH_COLUMN,1)); /** * 實做一個刪除資料表欄位 function * @prama $table STRING * @prama $columns ARRAY */... <a class="meta-more" href="http://www.taiwangeek.com/2010-08/phppdosqlite-drop-columns-function.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<pre class="brush:php">//CODE DEMO
$dbh = new PDO('sqlite:ClientFB.sqlite3');
$st = $dbh-&gt;query("PRAGMA table_info(ap_form_elements)");
var_dump($st-&gt;fetchAll(PDO::FETCH_COLUMN,1));

sqlite_drop_table_columns('ap_form_elements',array('element_position','element_default_value'),$dbh);

$st = $dbh-&gt;query("PRAGMA table_info(ap_form_elements)");
var_dump($st-&gt;fetchAll(PDO::FETCH_COLUMN,1));

/**
* 實做一個刪除資料表欄位 function
* @prama $table STRING
* @prama $columns ARRAY
*/
function sqlite_drop_table_columns($table,$columns,$dbh){
//取得所有欄位
$st = $dbh-&gt;query("PRAGMA table_info(ap_form_elements)");
if($st){
$fields = $st-&gt;fetchAll(PDO::FETCH_COLUMN,1);
//去除不要的欄位
$fls = array();
foreach($fields as $f){
if(!in_array($f,$columns)){
$fls[] = $f;
}
}
}else{
return FALSE;
}
unset($st);
//組合SQL語法
$field_list = implode(',',$fls);
$SQL = &lt; &lt;&lt;QUERY
CREATE TEMPORARY TABLE {$table}_bak({$field_list});
INSERT INTO {$table}_bak SELECT {$field_list} FROM {$table};
DROP TABLE {$table};
CREATE TABLE {$table}({$field_list});
INSERT INTO {$table} SELECT {$field_list} FROM {$table}_bak;
DROP TABLE {$table}_bak;
QUERY;
return $dbh-&gt;exec($SQL));
}
</pre>
<p>This is a sample show case,It will break the table attribut (ex: AUTOINCREMENT,PRIMARY KEY&#8230;.)</p>
<p>AND this is more powerful version</p>
<pre class="brush:php">
/**
* implement a drop columns sqlite function
* @param $table STRING
* @param $columns ARRAY
* @param $dbh PDO
* @retrun FALSE|INT
*/
function sqlite_drop_table_columns($table,$columns,$dbh){
	//取得所有欄位
	$st = sqlite_create_analytic($table,$dbh);
	if($st){
		$fields = array_keys($st);
		//去除不要的欄位
		$fls = array();
		foreach($st as $f =&gt; $v){
			if(!in_array($f,$columns)){
				$fls[$f] = $v;
			}
		}
	}else{
		return FALSE;
	}
	unset($st);
	//組合SQL語法
	$field_list = implode(',',array_keys($fls));
	$field_list_sql = implode(',',array_values($fls));
	$SQL = &lt;&lt;&lt;QUERY
CREATE TEMPORARY TABLE {$table}_bak({$field_list_sql});
INSERT INTO {$table}_bak SELECT {$field_list} FROM {$table};
DROP TABLE {$table};
CREATE TABLE {$table}({$field_list_sql});
INSERT INTO {$table} SELECT {$field_list} FROM {$table}_bak;
DROP TABLE {$table}_bak;
QUERY;

	return $dbh-&gt;exec($SQL);
}
/*
* @param $table STRING
* @param $dbh PDO
* @return FALSE|ARRAY
*/
function sqlite_create_analytic($table,$dbh){
	$sql = "SELECT sql FROM sqlite_master WHERE type='table' and name='{$table}'";
	$st = $dbh-&gt;query($sql);
	if($st){
		$sql = $st-&gt;fetch(PDO::FETCH_COLUMN,1);
	}else{
		return FALSE;
	}

	if(preg_match('/\(([\s\S\n]+)\)/si',$sql,$mt)){
		$col_sqls = explode(',',$mt[1]);
		$columns = array();
		$st = $dbh-&gt;query("PRAGMA table_info({$table})");
		if($st){
			$cols = $st-&gt;fetchAll(PDO::FETCH_COLUMN,1);
			foreach($cols as $col){
				foreach($col_sqls as $col_sql){
					$test = str_replace(array('"',"'"),'',$col_sql);
					if(FALSE === strstr($test,"{$col} ")){
						continue;
					}else{
						$columns[$col] = trim($col_sql);
					}
				}
			}
			if(empty($columns)){
				return false;
			}else{
				return $columns;
			}
		}else{
			return false;
		}
	}else{
		return FALSE;
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-08/phppdosqlite-drop-columns-function.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>NotePad++ 5.7 in windows7 support php function list</title>
		<link>http://www.taiwangeek.com/2010-08/notepad-5-7-windows7-support-php-function-list.html</link>
		<comments>http://www.taiwangeek.com/2010-08/notepad-5-7-windows7-support-php-function-list.html#comments</comments>
		<pubDate>Wed, 11 Aug 2010 13:08:21 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[原創]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=1302</guid>
		<description><![CDATA[This case spend me so much time . Step 1. Download this file FunctionList.zip Step 2. Install notepad++ 5.7 and don&#8217;t install with %APPDATA% Step 3. unzip the FunctionList.zip and... <a class="meta-more" href="http://www.taiwangeek.com/2010-08/notepad-5-7-windows7-support-php-function-list.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This case spend me so much time .</p>
<p>Step 1.<br />
Download this file<br />
<a  href="http://www.taiwangeek.com/ST/FunctionList.zip" target="_blank">FunctionList.zip</a></p>
<p>Step 2.<br />
Install notepad++ 5.7 and don&#8217;t install with %APPDATA%</p>
<p>Step 3.</p>
<p>unzip the FunctionList.zip and copy all file to <notepad ++ install dir>/plugins<br />
<a  href="http://www.taiwangeek.com/2010-08/notepad-5-7-windows7-support-php-function-list.html/notepad-2" rel="attachment wp-att-1304"><img src="http://www.taiwangeek.com/wp-content/uploads/2010/08/notepad-300x207.png" alt="" title="notepad with php function list" width="300" height="207" class="alignnone size-medium wp-image-1304" /></a><br />
</notepad></p>
<p>This Article is from</p>
<p>http://www.danielkassner.com/2010/01/22/using-notepads-function-list-plugin-for-php-development</p>
<p>http://sourceforge.net/projects/npp-plugins/forums/forum/670934/topic/3568427</p>
<p>(This has been corrected with the V2.1.0.1 version, and also added powershell support:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-08/notepad-5-7-windows7-support-php-function-list.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[xampp+komodo] php code beautifier</title>
		<link>http://www.taiwangeek.com/2010-07/xamppkomodo-php-code-beautifier.html</link>
		<comments>http://www.taiwangeek.com/2010-07/xamppkomodo-php-code-beautifier.html#comments</comments>
		<pubDate>Tue, 20 Jul 2010 03:48:51 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[原創]]></category>
		<category><![CDATA[komodo]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/2010-07/xamppkomodo-php-code-beautifier.html</guid>
		<description><![CDATA[That&#8217;s very simple and easy. c:\xampp\php&#62;PEAR install PHP_Beautifier-beta After install PHP_Beautifier,you will find the c:\xampp\php\php_beautifier.bat And just Do as below pictures]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s very simple and easy.
<pre class="brush:php">c:\xampp\php&gt;PEAR install PHP_Beautifier-beta</pre>
<p>After install PHP_Beautifier,you will find the </p>
<pre class="brush:php">c:\xampp\php\php_beautifier.bat</pre>
<p>And just Do as below pictures </p>
<p><a  href="http://www.taiwangeek.com/wp-content/uploads/2010/07/codesetting.gif" class="thickbox no_icon" rel="gallery-1295" title="code-setting"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="code-setting" border="0" alt="code-setting" src="http://www.taiwangeek.com/wp-content/uploads/2010/07/codesetting_thumb.gif" width="553" height="344" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-07/xamppkomodo-php-code-beautifier.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress admin side query debug</title>
		<link>http://www.taiwangeek.com/2010-07/wordpress-admin-side-query-debug.html</link>
		<comments>http://www.taiwangeek.com/2010-07/wordpress-admin-side-query-debug.html#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:39:55 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[原創]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=1231</guid>
		<description><![CDATA[Sometime I really hat wordpress query module.
For debug ,it is too many package!!

Now I show the way to sql debug]]></description>
			<content:encoded><![CDATA[<p>Sometime I really hat wordpress query module.<br />
For debug ,it is too many package!!</p>
<p>Now I show the way to sql debug</p>
<p>edit /wp-includes/wp-db.php<br />
and find&#8230;
</p>
<pre class="brush: php;">$this-&gt;result = @mysql_query( $query, $dbh ); // line: 1111
</pre>
<p>And replace like below&#8230;</p>
<pre class="brush: php;">if ( is_admin() ){
			echo "<!--".$query."-->\n";
		}
		$this-&gt;result = @mysql_query( $query, $dbh );
</pre>
<p>That&#8217;s all. After that you will get all query sql throw Html-Source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-07/wordpress-admin-side-query-debug.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpquery edit meta(case-insense)</title>
		<link>http://www.taiwangeek.com/2010-05/phpquery-edit-metacase-insense.html</link>
		<comments>http://www.taiwangeek.com/2010-05/phpquery-edit-metacase-insense.html#comments</comments>
		<pubDate>Tue, 25 May 2010 17:13:46 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[原創]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[PHPQUERY]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/33-15-useful-twitter-hacks-and-plug-ins-for-wordpress.html</guid>
		<description><![CDATA[Sometime the html meta like: or or If you just use &#8220;meta[name='keywords']&#8221; to find the node,you will get nothing. Because what the phpquery do is expand css selector to xpath... <a class="meta-more" href="http://www.taiwangeek.com/2010-05/phpquery-edit-metacase-insense.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Sometime the html meta like:</p>
<pre class="brush: xml">
<meta name='<strong>Keywords' content="" />
or
<meta name='KEYWORDS' content="" />
or
<meta name='KEYwORDS' content="" />
</meta></pre>
<p>If you just use &#8220;meta[name='keywords']&#8221; to find the node,you will get nothing.<br />
Because what the phpquery do is expand css selector to xpath query.</p>
<p>Xpath  require attribut value is <em>case</em>-<em>sensitive. So where is the safe way to got [meta keywords]&#8216;s attribute value?</em><br />
</p>
<pre class="brush: php">
$doc = phpQuery::newDocument($ff);
//open the phpquery debug mode
phpQuery::$debug = true;
$meta_val = '';
$g_select = 'meta[name]';
foreach($doc[$g_select] as $eml){
$name_tmp = pq($eml)->attr('name');
//force all meta name to be lowercase
pq($eml)->attr('name',strtolower($name_tmp));
}
$ff = $doc->htmlOuter();
phpQuery::unloadDocuments();
$doc = phpQuery::newDocumentHTML($ff);
//than we just use meta[name="keywords"] to got meta
$select = 'meta[name="keywords"]';
$meta = $doc['$select']
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-05/phpquery-edit-metacase-insense.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (request URI doesn't have a trailing slash)

Served from: www.taiwangeek.com @ 2012-05-19 05:47:49 -->
