Monday, April 19, 2010

User interface testing tool


Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

php unit test

http://www.phpunit.de/manual/current/en/automating-tests.html

Tuesday, March 9, 2010

php header cannot be rewrite

我用php的header()函式來轉換網頁,
之後就出現
Cannot modify header information - headers already sent by
這串文字,
我看書上寫是因 為沒加session_start的標檔,
加上去後也還是一樣的情況,
在網路上找到一些方法,
有人說"header函式前不能有 任何輸出
"而且"BOM"也可能是原因之一,
後來我發現這個方法也不行,
後來在別人 的BLOG找到,
http://jmizl.pixnet.net/blog/post/13747457
Step1. 開啟 PHP 資料夾內的 php.ini 檔。
Step2. 找到『output_buffering』這行,將預設的『Off』改為『On』,並重啟 Apache services 即可。
這樣就可以 了,
要記得O要大寫的。

Tuesday, March 2, 2010

Cakephp list field combine

如果有d人叫你combine 個table 入面既field咁你就可以用以下既方法

$flights = $this->Package->Flight->
find('all',array('contain'=>'Airline','fields'=>array('Flight.id','Flight.flight_number', 'Airline.airline_code')));
$flights = Set::combine($flights, '{n}.Flight.id',
array('%s %s', '{n}.Airline.airline_code', '{n}.Flight.flight_number'));