PHP Programming Tutorials, Tips and Scripts
http://dev.fyicenter.com/faq/php/
分類: 未分類
感謝 DB Demo 順利
今天的大事,就是 DataBase 的期末專題 Demo。
因為我只會 PHP 所以寫小小的考古題系統,今天 Demo 還算順利只是網路很不穩定而已。雖然說小系統,不過我犧牲了一週的睡眠時間把操作和以前學到的技術放進去,目前做到檔案下載位置隱藏、Paros 測不到 SQL injection。不過搜尋功能作的自己很不滿意,之後可能在慢慢改吧。
Demo 後助教的評分是 8 + 10 + 9 + 9,辛苦總算沒有白費 ~”~
不過今天還是不能太早睡,人機介面還有二個 Demo,其中還有一個要做問卷調查,也就是說今年過年真的要守歲啦 XD
Subversion (SVN) 電子書
Version Control with Subversion
http://svn.stu.edu.tw/svnbook/book.html
感謝 legnaleurc 熱心提供~
ps. 看來這個寒假會不輕鬆 ~”~
Merry Christmas
Well…..Merry Christmas to every body ~
Though there are shows and activities in our unversity, I still have to burn the midnight oil to finish my homework. But lovely, when I open Google’s homepage, I saw the logo changed ! And s series of picture will come out.
Google did it last year, too. It was a family of kangaroo celebrating holidays with cooperation, sweetness and happiness. You can read the article 「Google 首頁的 Logo」 I wrote before.
A series of pictures came out, but I still don’t know what Google want to tell us. What everybody think when seeing the picture below ?
This is my first time writing things in English. I have very poor grammar, so tell me if I have any mistake. Thanks a lot.
在網頁中嵌入 FCKeditor by PHP
網路上的所見即得編輯器真多,昨天為了讓使用者不用自己打 HTML 標籤,花了一些時間把 FCKeditor 嵌入網頁中使用,功能比我想像中的還要強大!不但基本該有的按鈕都有了,還支援復原、剪貼簿、圖片和檔案上傳、表格、排版,甚至還能編輯表單!連在網頁上面顯示的工具列也可以自訂按鈕功能和版面樣式!
功能強但是安裝卻很簡單,只要在 PHP 程式碼中也只要加入五行左右的程式碼就可以正常運作,不賴吧?
首先你必須先引用 FCKeditor 已經寫好的程式碼,裡面會宣告編輯器所用到的物件和物件屬性:require("fckeditor/fckeditor.php");
再來就可以宣告編輯器物件,並且對物件屬性做設定:
$oFCKeditor = new FCKeditor('FCKeditor1');
$oFCKeditor->BasePath = 'fckeditor/';
$oFCKeditor->Value = 'Default text in editor';
第一行 initialize 中的字串,是產生文字編輯區時編輯區的名稱,也就是 textarea 的 name 屬性,以上面的範例來說,後端要接收資料就要使用:$_POST[‘FCKeditor1’]。
第二行是設定 FCKeditor 程式所在位置,如果沒有設定好,會無法載入 Javascript 和 CSS 檔,到時候網頁會無法顯示。第三行則是文字編輯區預設會出現的文字。
最後在 <form></form> 中間加上:$oFCKeditor->Create();
這樣顯示出來大概會向這樣:
再來我們加入二個參數來設定編輯器預設的大小:
$oFCKeditor->Width = '100%';
$oFCKeditor->Height = '400';
如果你不喜歡預設的版面,FCKeditor 有提供 office2003 和 silver 的版面可以更換,只要加入版面路徑到參數裡面就可以了:$oFCKeditor->Config['SkinPath'] = 'skins/office2003/';
當然 FCKeditor 的功能不只如此,其他功能在官方的部落格都有詳細的說明。