<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-16249272</id><updated>2011-11-28T07:51:20.946+08:00</updated><category term='PHP'/><category term='Mobile'/><category term='COM'/><category term='Hacking the Core of PHP'/><category term='ActiveX Control'/><category term='CSS'/><category term='編碼'/><category term='Lotus Notes'/><category term='Javascript'/><category term='學校的作業'/><category term='Funny'/><title type='text'>$小企鵝::_94iPHPer();</title><subtitle type='html'>因為愛、所以愛、就是愛 》94i 這裡。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://94i.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-16249272.post-7009812330910352321</id><published>2010-11-25T15:26:00.003+08:00</published><updated>2010-11-26T11:11:32.919+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='學校的作業'/><title type='text'>Cm取n</title><summary type='text'>這一篇是在 這邊看到的討論
http://twpug.net/modules/newbb/viewtopic.php?viewmode=flat&amp;type=&amp;topic_id=5542&amp;forum=13

Cm取n 

下列是C5取1到C5取5所有排列組合...
第一層{1}{2}{3}{4}{5}
第二層{12}{13}{14}{15}{23}{24}{25}{34}{35}{45}第三層{123}{124}{125}{134}{135}{145}{234}{235}{245}{345}第四層{1234}{1235}{1245}{1345}{2345}第五層{12345}


&lt;?php
class Cmn
{
        public static function output ($m, $n)
        {
                // $str = range</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/7009812330910352321/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2010/11/cmn.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7009812330910352321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7009812330910352321'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2010/11/cmn.html' title='Cm取n'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-2869769176283989553</id><published>2010-09-19T18:32:00.000+08:00</published><updated>2010-09-19T18:32:03.130+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Funny'/><title type='text'>菊花文</title><summary type='text'>菊花文是最近網路流行的ㄧ種新文體，大概就是那些自我感覺良好的人才會使用，因文字後面加上菊花符號，因此而得名。

寫程式也要趕的上一些流行對吧，那麼就來一個 PHP 版的菊花文轉換函式：

class Chrysanthemum{        public static function get ($str)        {                mb_internal_encoding("UTF-8");                $len = mb_strlen($str);                $mb = array();                for ($i = 0; $i &lt; $len; $i++) {                        $mb[] = mb_substr($str, $i, 1);                }</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/2869769176283989553/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2010/09/blog-post.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/2869769176283989553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/2869769176283989553'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2010/09/blog-post.html' title='菊花文'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-2877119650716057627</id><published>2010-07-28T22:07:00.000+08:00</published><updated>2010-07-28T19:09:31.333+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacking the Core of PHP'/><title type='text'>在 Windows 編譯PHP原始碼 (VC++9)</title><summary type='text'>我們需要安裝下面編譯器 和 類別庫 用來編譯PHP，這篇文章則以PHP5.3.1為編譯範例 ：




Microsoft Visual Studio C++ 2008 Express Edition x86
Windows SDK 6.1
PHP 編譯用工具
PHP 延伸模組編譯用開發套件（選擇性）

第1,2項，只要下一步的預設安裝即可。(重要：如果是編譯 apache SAPI請用 VC++6 x86 和 Thread Safe 模式)
第3,4項的部分，我們建立一個開發用的目錄夾 c:\php-sdk 並且將 binary-tools.zip 解開到這個目錄匣內，延伸模組用的開發套件也是解壓縮後放到這個目錄夾上來。如果都有抓回並解開的話，那麼c:\php-sdk 底下會有四個目錄匣：


bin        (工具執行檔，動態連結檔)
script    (系統環境變數批次檔)</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/2877119650716057627/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/windows-php.html#comment-form' title='9 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/2877119650716057627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/2877119650716057627'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/windows-php.html' title='在 Windows 編譯PHP原始碼 (VC++9)'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-1966826234488629526</id><published>2010-01-20T15:10:00.000+08:00</published><updated>2010-01-20T15:10:15.649+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='學校的作業'/><title type='text'>求點到直線距離</title><summary type='text'>好幾天沒寫部落格，剛好在某討論區看到Ｃ版本的點到線段距離的算法，趕快寫一篇PHP版本『點到直線』和『點到線段』的最短距離。這個方式是透過海倫公式求得面積之後，在透過面積 = 底 x 高 / 2的公式取得高(最短距離)。

問：在直角座標平面上 , P( - 4 , 3 ) 到直線 3x-4y=12 的距離為多少?

那麼，我們先找出在直線上的AB 任意兩點，把A(4,0),B (0,-3)和P( - 4 , 3 ) 連成一個三角形。





&lt;?php// 作標x,y 的 Value Objectclass Point{    public $x;    public $y;}// 取得兩點距離class Distance{    public static function get (Point $p1, Point $p2)    {        return sqrt(($p1</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/1966826234488629526/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2010/01/blog-post_20.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/1966826234488629526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/1966826234488629526'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2010/01/blog-post_20.html' title='求點到直線距離'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-8388279086741625471</id><published>2010-01-14T10:35:00.000+08:00</published><updated>2010-01-14T10:35:30.494+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mobile'/><title type='text'>智慧型手機瀏覽器的電話撥號</title><summary type='text'>目前大多數人用的智慧型手機，都可以透過 HTML 語法直接在瀏覽器撥號。有的瀏覽器會自動辨識字串是否為電話號碼，只要碰觸就可以撥號（如 iPhone 的 Safari 或 Opera），但是若定義 doctype 則可能該功能消失，最保險的方式就是將電話撥號的語法寫在 HTML 上。




:p 灌水

我分成兩類，可以判斷瀏覽器的類型輸出該類的語法
第一種：使用 Safari 瀏覽器類型的 (如 iPhone和 Google Phone)

$HTML = "&lt;a href=\"tel:".$TEL."\"&gt;".$TEL."&lt;/a&gt;";

第二種：使用 WTAI 規格類型(如N97的S60,Windows Phone,Opera)

$HTML = "&lt;a href=\"wtai://wp/mc;".$TEL."\"&gt;".$TEL."&lt;/a&gt;";

嗯~以上有出現電話,</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/8388279086741625471/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2010/01/blog-post.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/8388279086741625471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/8388279086741625471'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2010/01/blog-post.html' title='智慧型手機瀏覽器的電話撥號'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-1129868421573251957</id><published>2010-01-11T16:39:00.001+08:00</published><updated>2010-01-11T17:16:25.473+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='學校的作業'/><title type='text'>6個G</title><summary type='text'>原始討論：http://twpug.net/modules/newbb/viewtopic.php?topic_id=4828&amp;forum=16

一個蠻有趣的討論題，這篇可以提供一下學校作業解題的思考方向，可以使用從頭到尾運行一遍，取出答案。或是由數學公式直接取得答案。

題目：6個G


在下列乘法算式中，每個字母代表0~9的一個數字，且不同的字母代表不同的數字：

　　ＡＢＣＤＥ

Ｘ　　　　　Ｆ

－－－－－－－

　ＧＧＧＧＧＧ

求出各字母對應之數字。

有印象中，有一題最基本題， 1+2+3+.....+1000 這道題嗎？你可以跑回圈計算總合



for ($i = 1; $i &lt;= 1000; $i++) $sum += $i;echo $sum;


或是直接用公式 (n * (n +1)) / 2 算出答案

echo (1000 * (1000 + 1)) / </summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/1129868421573251957/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2010/01/6g.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/1129868421573251957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/1129868421573251957'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2010/01/6g.html' title='6個G'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-806671767157440153</id><published>2009-12-22T09:44:00.002+08:00</published><updated>2009-12-22T09:56:34.599+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacking the Core of PHP'/><title type='text'>PHP Extension 的開發環境建立 (Unix-Like方式)</title><summary type='text'>有一陣沒寫 php extension，最近試了一下 PHP 5.3.1 ，發覺它的預設有稍微的不一樣。所以重新記錄一下，建立一個PHP extension 的方式與注意事項。這一篇使用 Linux 下開發當範例，大部分的 unix - like 都為相同方式。


1. 下載 PHP Source


phper@debian:/opt/source$ wget http://tw.php.net/get/php-5.3.1.tar.gz/from/tw2.php.net/mirror

2. 解開 PHP Source

 phper@debian:/opt/source$ tar zxvf php-5.3.1.tar.gz

3. 編譯 PHP Source：產生 CLI 執行檔和相關開發用檔案(如php-config, phpize)，為了減少不必要的模組載入和開發套件的安裝，</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/806671767157440153/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/php-extension-unix-like.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/806671767157440153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/806671767157440153'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/php-extension-unix-like.html' title='PHP Extension 的開發環境建立 (Unix-Like方式)'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-7371238909610529591</id><published>2009-12-17T16:33:00.001+08:00</published><updated>2009-12-17T16:38:09.198+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>取消文字選取狀態</title><summary type='text'>由於作了拖拉物件功能，在廣大的區域移動會造成選取的狀態，整片反白影響了外觀。所以只好在拖拉物件的觸發事件內加了一些取消文字選取狀態的程式碼。

寫了一下範例，開關選取文字狀態的按鈕：



function undoSelect () {
    document.onselectstart = new Function("return false;");
    document.body.style.MozUserSelect = 'none';
}

function doSelect ()
{
    document.onselectstart = new Function("return true;");
    document.body.style.MozUserSelect = 'text';
}


範例文字選擇

  

&lt;body&gt;&lt;script&gt;function</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/7371238909610529591/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_17.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7371238909610529591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7371238909610529591'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_17.html' title='取消文字選取狀態'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-5461270862487628366</id><published>2009-12-15T22:24:00.004+08:00</published><updated>2009-12-15T22:32:23.598+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><title type='text'>讓網站的小圖示共用一張圖片</title><summary type='text'>為什麼要讓網站的小圖示共用一張圖片呢？其實在流量小的網站是沒差別的，但是在高流量的網站，一個美觀且功能眾多的網頁，光一個瀏覽頁，就會大量的對 Web Server提出HTTP Request。所以將小圖合併成一個大圖檔，則可以降低Web Server的請求處理。流量大的網站常常使用這種技巧，如 Facebook 就大量使用到這樣的方式。

下面範例是使用一張大圖，透過CSS定義，取得小圖的圖形。



我將一組小圖示組成一個大圖：圖示來源

然後利用這張大圖來作一個範例：



大圖

空白圖






&lt;style&gt;.santa {    background-image:url(map.gif);    background-position:0px 0px; width:48px; height:48px;}.reindeer {    background-image:url(</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/5461270862487628366/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_3834.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/5461270862487628366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/5461270862487628366'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_3834.html' title='讓網站的小圖示共用一張圖片'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_zl-J76uZSv8/SyeYpk5QpXI/AAAAAAAAAH8/_qIASViEM5A/s72-c/map.gif' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-7213528587935704296</id><published>2009-12-15T17:26:00.021+08:00</published><updated>2009-12-15T17:55:37.640+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><title type='text'>讓圖或顯示區塊變透明</title><summary type='text'>今天記錄這個，讓顯示的元件變透明的語法，IE/Chrome/Firfox都可以用方式。

&lt;style&gt;.cryst {
    filter:alpha(opacity=50);    opacity: 0.5;}&lt;/style&gt;&lt;img src=http://img0.gmodules.com/logos/esperanto_09-ig.gif class="cryst"&gt; 

上面定義的部分 filter:alpha(opacity=50);是給 IE 辨識，而opacity則是給支援CSS 3.0的瀏覽器辨識。

原本的圖：
  

效果大約是這樣：

.cryst {
        filter:alpha(opacity=50);
        opacity: 0.5;
}



那若要在這邊文章加一個浮水印呢？那調整一下透明度越透明越好，在將位置移到文件正中間：
&lt;</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/7213528587935704296/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_15.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7213528587935704296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7213528587935704296'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_15.html' title='讓圖或顯示區塊變透明'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-2353162261784981458</id><published>2009-12-14T14:00:00.007+08:00</published><updated>2009-12-14T21:31:45.143+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>內嵌網頁的系統自動登入</title><summary type='text'>自動登入的方式其實有很多種實作方式，會因為系統的類型而有所不同。如登入電腦時，所有開啟的Client AP或是 Web AP都進入登入狀態，或是像是類似 Facebook在登入後，放在世界各地的AP利用Facebook提供的API確認登入，才讓自己進入登入狀態。

而我介紹的這個方式，是指自己的系統，開了幾個 iframe 視窗，放置不同網址但需要登入的AP系統。而我們設計簡單的紀錄該系統的帳號密碼，再登入我們的系統的時候，也一併登入那些系統。


首先要先了解一個 Javascript 的觀念。iframe 文件內載入完成的觸發處理。

&lt;body&gt;&lt;script&gt;var iframe = document.createElement("iframe");iframe.src = "http://127.0.0.1/login.php";</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/2353162261784981458/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_14.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/2353162261784981458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/2353162261784981458'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_14.html' title='內嵌網頁的系統自動登入'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-5299610509031853040</id><published>2009-12-12T14:29:00.002+08:00</published><updated>2009-12-12T14:31:44.225+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='編碼'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>簡單的文字檔編碼</title><summary type='text'>文件資料通常需要作一些加密處理，避免一眼就能看清楚文件的內容，然後再用相同的方式作解密文件。我們用範例程式碼來說明一下幾個簡單的文件資料編碼方式。

１對１字元交換方式
0xFF 的 XOR 字元 運算方式
字元移位方式




第一種：１對１字元交換方式。這一種的方式如同 PHP的str_rot13的函式一樣，為固定的英文字母作交換。下面範例是用PHP實作 str_rot13的方式：


&lt;?phpclass String1{    // 搜尋字元組    public static $rot13_from = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";    // 替換字元組    public static $rot13_to   = "</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/5299610509031853040/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_12.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/5299610509031853040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/5299610509031853040'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_12.html' title='簡單的文字檔編碼'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-8053320438817891839</id><published>2009-12-08T20:38:00.001+08:00</published><updated>2009-12-08T20:40:05.338+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Lotus Notes'/><title type='text'>賞你個正妹牆</title><summary type='text'>其實Lotus Notes這個系統是一個相當活的平台，可以內嵌 ActiveX Control，也可以掛入Java Applet。

嘻～不過他可以嵌入WebBrowser 這個控制(Control)，就有很大的點了，玩了幾種玩法，其實都蠻穩定的。因為要製造一點話題，所以我選了這個寄給同事後大受好評的小玩意兒。


這個範例是使用 Lotus Notes Client 8.0.2，而且必須安裝Lotus Domino Designer（編輯郵件時，才會出現比較多的一些指令控制介面）

首先新增一個郵件，然後在建立＝＞物件　這時會彈跳出一個建立物件視窗：




然後我們點選控制，並且找到 Microsoft Web Browser 這個 Control，並且選擇他。

這時候鍵盤都不要動，當選擇完畢，上方的選單列的"文字"或"圖形"會將改成 Applet。
</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/8053320438817891839/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_08.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/8053320438817891839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/8053320438817891839'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post_08.html' title='賞你個正妹牆'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zl-J76uZSv8/Sx5AjVtkKZI/AAAAAAAAAHU/YvqblhHqcA8/s72-c/webbrowser.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-7166106334943511819</id><published>2009-12-08T19:32:00.001+08:00</published><updated>2009-12-08T20:40:28.312+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='學校的作業'/><title type='text'>大數運算 - 加法</title><summary type='text'>加法算法：首先將第一個數和第二個數字的每個位數（個位數、十位數、百位數、千位數…)，放進陣列內。之後將第一個數和第二個數的每個位數的陣列值相加，在放進另外一個加總的新陣列內。之後判斷是否大於10，大於10，則上位數進位，自己減10 (n - 10) 或除以１０取餘數($n  % 10)。


&lt;?phpclass BigInteger{    public static function add ($a, $b)    {        $al = strlen($a);        $bl = strlen($b);        // 取最大的數值長度        $len = $al &gt; $bl ? $al : $bl;        for ($i = 0; $i &lt; $len; $i ++) {            // 將每個位數相加，並放入陣列內</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/7166106334943511819/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7166106334943511819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/7166106334943511819'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/12/blog-post.html' title='大數運算 - 加法'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16249272.post-3986256747653503876</id><published>2009-12-05T10:19:00.003+08:00</published><updated>2009-12-05T10:25:12.924+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='COM'/><title type='text'>OCR</title><summary type='text'>這個範例使用 Microsoft Office 內的工具 Microsoft Office Document Imaging，他有 OCR 功能。所以想應用在大量掃描文件，並且撰寫批次轉成文件檔的可以參考看看。

首先一定是要具備 Windows 系統和安裝 Microsoft Office 的工具Microsoft Office Document Imaging，這樣 PHP 就可以透過 COM 操作。

下面的程式碼範例是簡易的讀取一個 TIF (Tagged Image File Format) 檔案，並且轉成文字檔。
&lt;?php$MODIDocument = new COM("MODI.Document", null, CP_UTF8);$MODIDocument-&gt;Create("modi.tif");// tif 格式 有分頁概念，可以使用 count($</summary><link rel='replies' type='application/atom+xml' href='http://94i.blogspot.com/feeds/3986256747653503876/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://94i.blogspot.com/2009/11/ocr.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/3986256747653503876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16249272/posts/default/3986256747653503876'/><link rel='alternate' type='text/html' href='http://94i.blogspot.com/2009/11/ocr.html' title='OCR'/><author><name>小企鵝</name><uri>http://www.blogger.com/profile/08690160430887851639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_zl-J76uZSv8/SwvBMFD6baI/AAAAAAAAAFk/0nDl2dBtlYU/S220/a4.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_zl-J76uZSv8/SxnEL2gwWOI/AAAAAAAAAHM/oDgk_T-Tjo8/s72-c/modi.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
