<?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>遨遊飛翔 &#187; PHP</title>
	<atom:link href="http://blog.shian.tw/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.shian.tw</link>
	<description>學習筆記 For php、jQuery、MySql、Centos、Suse、Server、CodeIgniter</description>
	<lastBuildDate>Sun, 09 Oct 2011 16:00:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://blog.shian.tw/?pushpress=hub'/>
		<item>
		<title>shared session in memcached</title>
		<link>http://blog.shian.tw/shared-session-in-memcached.html</link>
		<comments>http://blog.shian.tw/shared-session-in-memcached.html#comments</comments>
		<pubDate>Sun, 16 May 2010 16:00:27 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=484</guid>
		<description><![CDATA[之前介紹過了memcached安裝以及session in memcached後，接下來本篇介紹在主網域下跨子網域取得同樣的session資料。針對高流量的網站必須會有好幾台web server同時上線運作，先不論用什麼方式去將使用者導去哪台server，情況一定會是使用者不管連去那台server，session資料必須要共用，否則假設使用者在server-a登入後，結果導回網站是連到server-b後卻變成是未登入。 準備 1. 二台server以及二個子網域 2. 安裝好memcached 3. 將session存進meacached 4. 修改C:\Windows\System32\drivers\etc\host，將二個子網域分別直接指定各server 測試 ?View Code PHP1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 &#8230; <a href="http://blog.shian.tw/shared-session-in-memcached.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/shared-session-in-memcached.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>session in memcached</title>
		<link>http://blog.shian.tw/session-in-memcached.html</link>
		<comments>http://blog.shian.tw/session-in-memcached.html#comments</comments>
		<pubDate>Sun, 09 May 2010 16:00:18 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=463</guid>
		<description><![CDATA[之前介紹過memcached跟安裝memcached部份，對於未來需要多server以及共用session的需求，我們可以利用memcached將session存至記憶體內，好方便統一管理以及快速回應等優點，本篇將實作透過memcached將session存進記憶體內。 設定 以下二個方式依自己的需求擇一即可。 1. 在程式上設定 ?View Code PHP1 2 ini_set&#40;'session.save_handler', 'memcache'&#41;; ini_set&#40;'session.save_path', &#34;tcp://host:port&#34;&#41;; 2. 修改 /etc/php.ini ?View Code BASH1 2 session.save_handler = memcache session.save_path = &#34;tcp://host:port&#34; 測試 ?View Code PHP1 2 3 4 5 6 7 session_start&#40;&#41;; &#160; $_SESSION&#91;'test'&#93; = &#8230; <a href="http://blog.shian.tw/session-in-memcached.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/session-in-memcached.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql to json</title>
		<link>http://blog.shian.tw/mysql-to-json.html</link>
		<comments>http://blog.shian.tw/mysql-to-json.html#comments</comments>
		<pubDate>Sun, 10 May 2009 16:00:10 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=301</guid>
		<description><![CDATA[最近剛好在 phpclasses 裡看到有人提供 mysql_to_json，這似乎是挺有趣的一個東西，在好奇之下把檔案抓來試用看看，使用相當簡單而且檔案又很小，或許之後會有用到。在php裡直接寫好條件查詢sql後再丟給這隻去回傳資料庫查到的資料，嗯…或許也是一個方式。 檔案 mysql_to_json 使用 載入mysql_to_json class ?View Code PHP1 include&#40;‘mysql_to_json.class.php’&#41;; 方式1 ?View Code PHP1 2 3 4 5 // 建立一個新的mysql_to_json介面 $mtj = new mysql_to_json&#40;$query&#41;; &#160; //輸出 echo $mtj-&#62;get_json&#40;&#41;; 方式2 ?View Code PHP1 2 3 4 5 //建立一個新的空的mysql_to_json &#8230; <a href="http://blog.shian.tw/mysql-to-json.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/mysql-to-json.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php-excel-writer</title>
		<link>http://blog.shian.tw/php-excel-writer.html</link>
		<comments>http://blog.shian.tw/php-excel-writer.html#comments</comments>
		<pubDate>Thu, 26 Mar 2009 06:10:39 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=276</guid>
		<description><![CDATA[Spreadsheet_Excel_Writer 這個PEAR LIB，可以將PHP的資料輸出成Excel檔案。 最近剛好需要將資料庫裡的資料讓使用者下載成excel檔案，剛好這個Spreadsheet_Excel_Writer正好可以使用，網路上已經有很多的相關文章了，這裡就記一下我使用後的筆記。 安裝 PEAR 如果PHP是自己編譯的話在configure加入 &#8211;with-pear 然後重新編譯它 # ./configure &#8211;with-pear # make # make install Package Information: OLE Easy Install：pear install OLE-1.0.0RC1 # /usr/local/php/bin/pear install OLE-1.0.0RC1 Package Information: Spreadsheet_Excel_Writer Easy Install：pear install Spreadsheet_Excel_Writer-0.9.1 # /usr/local/php/bin/pear install Spreadsheet_Excel_Writer-0.9.1 * &#8230; <a href="http://blog.shian.tw/php-excel-writer.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/php-excel-writer.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>只要MVC不要Framework</title>
		<link>http://blog.shian.tw/mvc.html</link>
		<comments>http://blog.shian.tw/mvc.html#comments</comments>
		<pubDate>Tue, 16 Dec 2008 00:00:12 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Framework]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=226</guid>
		<description><![CDATA[這段時間在學著使用Framework像是Zend Framework和CodeIgniter，至於哪一個好哪一個壞就不在這多說，網路上有太多 Framework 的比較，用了Framework之後我覺得我只要單純的MVC的架構而已，需要用到一個 Framework 來綁住自己嗎？ 雖然用Framework有很多好處像是、快速、簡單、有很多強大的LIB可以用，但是我不想被一個Framework綁住，效能也是一個原因。(其實是受了Rasmus Lerdorf的影響 XD) 所以打算自己做一個控制器的class來用就好，並且可以看Zend Framework和CodeIgniter的code來學習它們是怎麼做的，另外未來如果自己需要什麼功能就看看各Framework的lib有無提供class直接抓來用，或是自己寫一個也是可以。 目錄架構 ?View Code TEXT1 2 3 4 5 6 專案目錄\ libraries\ controllers\ views\ index.php .htaccess CODE .htaccess ?View Code TEXT1 2 3 4 5 6 7 .htaccess RewriteEngine On &#8230; <a href="http://blog.shian.tw/mvc.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/mvc.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zend_Controller Quick Start</title>
		<link>http://blog.shian.tw/zend_controller-quick-start.html</link>
		<comments>http://blog.shian.tw/zend_controller-quick-start.html#comments</comments>
		<pubDate>Thu, 27 Nov 2008 16:00:32 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/%e7%ad%86%e8%a8%98zend_controller-quick-start.html</guid>
		<description><![CDATA[剛開始學Zend Framework MVC模式的新手，參考官網的Quick Start以及網路上的相關文章建立MVC模式的架構，為了怕忘記將練習過的寫起來當做筆記。 運作流程   以 http://yourdomain/index/index 為例 ?View Code TEXT1 2 3 4 5 html/index.php (決定哪個控制器)          ↓ application&#60;/code&#62;/IndexController.php (建立控制器並設定動作)          ↓ views/scripts/index/index.phtml (輸出html頁) 準備 Zend Framework 官網下載Zend Framework 建立目錄結構 參考官方提供 目錄 library/Zend 為在官網下載的library，將它解壓縮後放置這裡 ?View Code TEXT1 2 &#8230; <a href="http://blog.shian.tw/zend_controller-quick-start.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/zend_controller-quick-start.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile PDO &amp; PDO_MYSQL for PHP5.2 Extensions</title>
		<link>http://blog.shian.tw/compile-pdo_pdo_mysql.html</link>
		<comments>http://blog.shian.tw/compile-pdo_pdo_mysql.html#comments</comments>
		<pubDate>Fri, 21 Nov 2008 03:51:28 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/compile-pdo-pdo_mysql-for-php52-extensoins.html</guid>
		<description><![CDATA[最近開始摸 Zend Framework 這個 PHP的Framework，正好摸到 Zend_Db 這個東東，可以使用它來跟資料庫做連接它也包含很多種資料庫，我的資料庫是使用MySql，所以需要用到 pdo_mysql 來做為php跟MySql連接的介面，開始來安裝 pdo 和 pdo_mysql 吧。 準備 pdo 和 pdo_mysql 可以在解開php壓縮檔裡面找到，存放於 path/php/ext/pdo &#38; path/php/ext/pdo_msql 或是可以直接到 http://pecl.php.net/package/pdo 下載 安裝pdo 編譯好後系統會告訴你pdo.so放置在哪裡，只要將它複製到你的extensions的目錄下 ?View Code BASH1 2 3 4 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir=/usr/ make make install 安裝pdo_mysql &#8230; <a href="http://blog.shian.tw/compile-pdo_pdo_mysql.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/compile-pdo_pdo_mysql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用PHP與SSH端連線</title>
		<link>http://blog.shian.tw/php_ss.html</link>
		<comments>http://blog.shian.tw/php_ss.html#comments</comments>
		<pubDate>Thu, 27 Dec 2007 18:59:38 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=45</guid>
		<description><![CDATA[php有個ssh2的Function可以利用它來跟ssh端作連線,但是必須另外編譯 libssh 和 ssh2 這二個套件 ,本篇介紹安裝以及使用php連接ssh 準備: libssh2 ssh2 libssh2_path 下載所需要的檔案 註: libssh2_path 編議有錯誤時會用到 安裝: # 安裝 libssh2 1. 解壓縮後並進入該目錄 2. ./configure &#8211;prefix=/usr  &#38;&#38; make all install 註: &#8211;prefix=/usr 將libssh2安裝在 /usr下 # 安裝 ssh2 1. 解壓縮後並進入該目錄 2. ./configure &#8211;with-ssh2 &#8211;with-php-config=/usr/local/php/bin/php-config 註: &#8230; <a href="http://blog.shian.tw/php_ss.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/php_ss.html/feed</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>

