Subversion Repositories php-qbpwcf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 liveuser 1
<?php
2
 
3
#宣告指派命名空間
4
namespace qbpwcf;
5
 
6
#匯入外部套件
7
include("../allInOne.php");
8
 
9
/*
10
 
11
#說明正在測試的內容
12
echo"<hr>ckEditor::importLib - testCase 1<br>";	
13
 
14
#涵式說明:
15
#匯入ckfEditor的函式庫.
16
#回傳結果:
17
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
18
#$result["error"],錯誤訊息.
19
#$result["content"],語法.
20
#$result["function"],當前執行的函數名稱.
21
#必填參數:
22
#$conf["libAddr"],字串,爲ckEditor套件的網路位置.
23
$conf["libAddr"]="lib/ckeditor/ckeditor";
24
#可省略參數:
25
#$conf["fileArgu"],字串,為當前檔案的路徑,預設為__FILE__.
26
#$conf["fileArgu"]=__FILE__;
27
#備註:
28
#開發中.
29
var_dump(ckEditor::importLib($conf));
30
unset($conf);
31
 
32
*/
33
 
34
/*
35
 
36
#說明正在測試的內容
37
echo"<hr>ckEditor::demo - testCase 1<br>";	
38
 
39
#涵式說明:
40
#即刻編輯與顯示預覽結果的demo.
41
#回傳結果:
42
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
43
#$result["error"],錯誤訊息.
44
#$result["content"],語法.
45
#$result["function"],當前執行的函數名稱.
46
#必填參數:
47
#$conf["libAddr"],字串,爲ckfEditor套件的網路位置,js附檔名會自動補上.
48
$conf["libAddr"]="lib/ckeditor/ckeditor";
49
#可省略參數:
50
#$conf["fileArgu"],字串,為當前檔案的路徑,預設為__FILE__.
51
#$conf["fileArgu"]=__FILE__;
52
#備註:
53
#開發中.	
54
var_dump(ckEditor::demo($conf));
55
unset($conf);
56
 
57
*/
58
 
59
/*
60
 
61
#說明正在測試的內容
62
echo"<hr>ckEditor::demo - testCase 2<br>";	
63
 
64
#涵式說明:
65
#即刻編輯從資料庫抓出來的資料與顯示預覽結果的demo.
66
#回傳結果:
67
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
68
#$result["error"],錯誤訊息.
69
#$result["content"],語法.
70
#$result["function"],當前執行的函數名稱.
71
#必填參數:
72
#$conf["libAddr"],字串,爲ckfEditor套件的網路位置,js附檔名會自動補上.
73
$conf["libAddr"]="lib/ckeditor/ckeditor";
74
#$conf["dbAccount"],字串,連線用的帳戶
75
$conf["dbAccount"]=$dbAccount;
76
#$conf["dbPassword"],字串,連線用的密碼
77
$conf["dbPassword"]=$dbPassword;
78
#$conf["dbAddress"],字串,自立庫的位址.
79
$conf["dbAddress"]=$dbAddress;
80
#$conf["dbName"],字串,資料庫名稱.
81
$conf["dbName"]="qbpwcf_demo";		
82
#$conf["dtName"],字串,資料表名稱.
83
$conf["dtName"]="ckeditor";
84
#$conf["columnName"],字串,欄位名稱.
85
$conf["columnName"]="html";
86
#$conf["columnName"]="content";
87
#可省略參數:
88
#$conf["fileArgu"],字串,為當前檔案的路徑,預設為__FILE__.
89
#$conf["fileArgu"]=__FILE__;
90
#$conf["putBy"],字串,內容要放到 textarea 還是用 ckeditor js 的 setData() 方法.前者請設定為"textarea",後者請設定為"native",預設為"textarea".
91
$conf["putBy"]="native";
92
#參考資料:
93
#using ckeditor=>http://docs.ckeditor.com/#!/guide/dev_installation
94
#get ckeditor content=>content http://docs.ckeditor.com/#!/guide/dev_savedata
95
var_dump(ckEditor::demoWithDb($conf));
96
unset($conf);
97
 
98
*/
99
 
100
/*
101
 
102
#說明正在測試的內容
103
echo"<hr>ckEditor::demoClassicV5 - testCase 1<br>";	
104
 
105
$conf=array();
106
var_dump(ckEditor::demoClassicV5($conf));
107
unset($conf);
108
 
109
*/
110
 
111
?>