Posted in CodeIgniter, php, Zend Framework on Jun 26th, 2009
Gallery 3.0 Beta 1 出來了,在 roga’s blog,看到這篇訊息,gallery 3 捨去 php smaty template engine,而改用 Kohana MVC Framework 這套 base on CodeIgniter 的 Framework,在 Gallery3:FAQ 裡面有提到為什麼會使用 Kohana 這套 MVC,gallery 團隊找尋了許多 MVC 的架構來幫助開發整個相簿系統,包含了 CakePHP、Zend Framework、Prado、Symfony、CodeIgniter,最後經過許多人的討論,選用了 Kohana 這套 MVC,原本打算考慮 CI 的,雖然 CI 支援 PHP4 跟 PHP5,以及它非常的小,對於效能方面也非常的好,但是並不支援 PHP5 的 exception,畢且有些少數的 Structure 只有支援 PHP4,所以就不被他們採納了,再來 Zend Framework 因為包含了 1705 個檔案,相當龐大,效能比 CI 少了 [...]
Read Full Post »
Posted in Linux, php, Zend Framework on Mar 29th, 2009
這篇算是 Google Calendar API 的結尾文章了,只剩下新增、刪除兩個功能尚未說明,那這兩個功能野蠻簡單的,底下就來介紹如何新增單一事件功能,看看是否要增另外新檔案放 form 的表單,我是把表單放入 index.php 再把資料傳送到 news.php 此檔案,先介紹 form 表單: <form action="news.php" method="post" name="GClab" id="GClab"> <h2>新增事件</h2> <p>*標題 <input name="title" type="text" id="title" size="20"/> <br /> 內容 <textarea name="content" cols="60" rows="5" id="content"></textarea> <br /> 地點 <input name="where" type="text" [...]
Read Full Post »
Posted in Linux, php, Zend Framework on Mar 28th, 2009
上一篇介紹了瀏覽 Google Calendar API 範圍內所有的事件,有沒有發現在 index.php 就有瀏覽單一事件的連結,我們透過 API 可以取得單一事件的 evenID,取得的方式就是透過 basename 函式: basename($event->id->text) 我們可以利用 $_GET 方式讀取到 evenID 值,傳送到 event.php 來接收 $eventId = ( isset($_POST[’id’]) ) ? $_POST[’id’] : $_GET[’id’]; 1. 新增 event.php 檔案,寫入開頭: <?php include(’config.inc.php’); /* * 首頁傳來的 event id 值 */ $eventId = ( isset($_POST[’id’]) ) ? $_POST[’id’] : $_GET[’id’]; $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; $client [...]
Read Full Post »
Posted in Linux, php, Zend Framework on Mar 27th, 2009
昨天寫了一篇 [PHP] Zend 使用 Google Calendar API – 環境建立架設,相信應該是非常簡單才對,那今天來介紹一下實做 Google Calendar API 的瀏覽、新增、刪除、修改事件的功能,在官方網站都有詳細的 API 功能介紹,我只不過把功能整合完整一點,詳細請看 Google Calendar API With PHP。 1. 瀏覽功能:建立 index.php /* * include 昨天新增的config.inc.php 檔案 */ include(’config.inc.php’); /* * 提供Calendar 的服務名稱 */ $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; /* * 登入帳號密碼 */ $client = Zend_Gdata_ClientLogin::getHttpClient($googleAccount, $googlePassword, $service);
Read Full Post »
Posted in Linux, php, Zend Framework on Mar 26th, 2009
最近又玩了 Googl 的 API:Google Calendar APIs and Tools,這個 API 可以讓 PHP 開發者對於使用 Google Canledar 有很大的幫助,可以新增事件,刪除事件,修改事件,或者是更改事件,相信在 Google 的 API 裡面都寫的很詳細,這 API 是由 Zend 底下所開發出來的,在 Zend Framework 底下是小 API 模組,大家可以在 這裡 下載到最新的版本 Zend Gdata 1.7.7,大家也可以直接在 Zend Framework 底下做開發,目前支援 PHP5,如果對 Google 月曆不會用的,可以上網找一下,很多 教學 的喔,底下是要針對開發環境建立做介紹。 針對 Google Calendar PHP API 教學大家可以先看看,今天先教大家建置環境,環境用在 Zend Framework 底下的作法,那架設 Zend Framework 可以參考我上一篇文章:[PHP] Zend Framework [...]
Read Full Post »
Posted in Linux, php, Zend Framework on Mar 24th, 2009
今天在公司上班需要用到 Zend Framework 這一套 MVC 的軟體,用來開發 Google Calendar APIs,這 API 是用 Zend Framework 下去寫得,在 Google 文件 說的很清楚,那底下來介紹一下安裝過程吧,首先環境要先有 Apache + PHP + MySQL,我本身用 Appserv 懶人套件,我是用 AppServ 2.5.10 裡面包含底下: Apache 2.2.8 PHP 5.2.6 MySQL 5.0.51b phpMyAdmin-2.10.3 1. 先修改 apache 設定 httpd.conf #LoadModule rewrite_module modules/mod_rewrite.so 改成 unmark 掉 LoadModule rewrite_module modules/mod_rewrite.so 修改 include_path 在 php.ini 裡面,或者是利用 set_include_path 來修改 [...]
Read Full Post »