[網站] 好站連結 (四)

PHP How to create Microsoft Office Documents with PHP IP 判斷方式 Get a list of all available constants with PHP Get a list of all available classes with PHP Get a list of all available functions with PHP The Google Analytics API and PHP: A series Google Analytics API PHP Class data method parameters Dynamically Create Menu With PHP DOM Enable the file manager connector with FCKEditor and PHP MySQL [Read More]

[教學] 加入 Sphinx 繁體中文全文檢索 on CodeIgniter

sphinx 在寫這篇之前,有介紹過了 Sphinx 一篇針對繁體中文檢索的教學,大家可以先去參考看看,把 Sphinx 服務架設起來,在搭配 CodeIgniter MVC Framework 使用,把 Sphinx 提供的 PHP API 放到 CI 的 Library 裡面就可以運作了,首先去官網下載套件,然後參考官方的安裝文件,大致上就差不多了,下載的檔案裡面會有 api 資料夾,裡面提供了 python, ruby, java, php 的 client 端檔案,讓您去自由呼叫,PHP 部份可以看 sphinxapi.php 這個檔案,我們也只需要把這個檔案放入 CI 的 Library 裡面,不過寫法有些改變,請看底下

[Read More]

[PHP] FreeBSD Sphinx 繁體中文全文檢索 on PHP

sphinx 最近想說幫之前替代役單位來把全文檢索的中文部份搞定,所以找了一些全文檢索的 open source,挑了這套網路上評價還不錯的 Sphinx,目前 Sphinx 支援的作業系統如下:

  • Linux 2.4.x, 2.6.x (various distributions)
  • Windows 2000, XP
  • FreeBSD 4.x, 5.x, 6.x
  • NetBSD 1.6, 3.0
  • Solaris 9, 11
  • Mac OS X 雖然上面寫 FreeBSD 只支援到 6.X,但是我測試是在 FreeBSD 7.1-RELEASE-p6 的環境,所以相當 ok 的,底下是我安裝在 FreeBSD 的心得筆記,PHP 官網上面有支援

Search Engine Extensions 的介紹,包含了 mnoGoSearchSphinx — Sphinx Client、Swish — Swish Indexing,可以利用 pecl 來安裝 Sphinx,目前版本:0.9.9-rc1。

[Read More]