七星潭
 
 
 
沒有顧忌的向前邁進

cabuchi 發表在 痞客邦 留言(1) 人氣()

同樣的模式在無窮回圈
以為不存在的仍舊依然
 
是真的不可能還是不願意?

cabuchi 發表在 痞客邦 留言(0) 人氣()

1717372872.jpg
庚寅年、謹賀新春。
此起彼落的鞭炮聲,好不熱鬧
 
沒有減少的跡象反而越隨著時間增長

cabuchi 發表在 痞客邦 留言(2) 人氣()

asus
 
 
 
各位親愛的好朋友

cabuchi 發表在 痞客邦 留言(0) 人氣()



雖然這張最後沒選成作品發表
但我還是喜歡這張:P
 

cabuchi 發表在 痞客邦 留言(2) 人氣()

20100105-照片001.jpg
                                                         謝謝阿巧幫我底掃

 

cabuchi 發表在 痞客邦 留言(8) 人氣()

在<head></head>裡面寫CSS的樣式宣告
<style type="text/css">
<style/>
之後再到<body></body>裡面應用樣式
 

cabuchi 發表在 痞客邦 留言(2) 人氣()

  Apache  
最多人使用三大WAMP安裝模組:
AppServ:http://www.appservnetwork.com/
輕巧的WAMP套件(只裝重要的程式部分),把一些知名的CMS包成套件給我們選用
如果只是要跑小論壇可以安裝這個即可,電腦負擔較小
所以大部分我都用此建立php環境! 

cabuchi 發表在 痞客邦 留言(2) 人氣()


今天  學校按照慣例在平安夜都會放假一天
這算是基督教學校的唯一優勢吧 
也給我在這忙碌的學期末裡有了喘口氣的時間
 

cabuchi 發表在 痞客邦 留言(2) 人氣()

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>testing</title>
</head>
<body>
<?php
/*
* 建立資料庫
* CREATE DATABASE `kiang_cycu` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
*
* 建立資料表
 
CREATE TABLE IF NOT EXISTS `messages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`poster` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`title` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
`body` text COLLATE utf8_unicode_ci NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
 
*/
 
/*
* 資料庫連線
*/
$dbn = new mysqli(
'localhost', //主機位置
'root', //帳號
'123', //密碼
'guestbook' //資料庫名稱
);
$dbn->set_charset('utf8');
 
/*
* 新增資料
*/
if($dbn->query('SELECT COUNT(*) AS count FROM messages')->fetch_object()->count == 0) {
$now = mktime();
for($i = 1; $i <= 20; $i++) {
$stmt = $dbn->prepare('INSERT INTO messages VALUES ( ?, ?, ?, ?)');
$poster = 'poster' . $i;
$title = 'title' . $i;
$body = 'body' . $i;
$date = date('Y-m-d H:i:s', ++$now);
$stmt->bind_param('ssss', $poster, $title, $body, $date);
$stmt->execute();
$stmt->close();
}
}
 
/*
* 取得資料
*/
echo '<table>';
echo '<tr><th>編號</th><th>發表人</th><th>標題</th><th>內容</th><th>時間</th></tr>';
$result = $dbn->query('SELECT * FROM messages');
while($data = $result->fetch_object()) {
echo '<tr>';
echo '<td>' . $data->id . '</td>';
echo '<td>' . $data->poster . '</td>';
echo '<td>' . $data->title . '</td>';
echo '<td>' . $data->body . '</td>';
echo '<td>' . $data->time . '</td>';
echo '</tr>';
}
echo '</table>';
?>
</body>
</html>

cabuchi 發表在 痞客邦 留言(0) 人氣()

<?php
/*
* 建立資料庫
* CREATE DATABASE `kiang_cycu` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
*
* 建立資料表
 
CREATE TABLE IF NOT EXISTS `messages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`poster` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`title` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
`body` text COLLATE utf8_unicode_ci NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
 
*/
 
/*
* 資料庫連線
*/
$dbn = new mysqli(
'localhost', //主機位置
'root', //帳號
'123', //密碼
'guestbook' //資料庫名稱
);
$dbn->set_charset('utf8');//設定資料庫連線編碼 中文可以完整顯示
//物件裡面的函式->方法(set_charset)
 
/*
* 新增資料
*/
                //從資料庫查詢有多少數量     [!!!]判斷資料庫裡驗有沒有資料 如果"沒有"
if($dbn->query('SELECT COUNT(*) AS count FROM messages') ->fetch_object()->count == 0) {//資料表
$now = mktime();
for($i = 1; $i <= 20; $i++) {//[!!!]沒有資料的話 就塞20筆進去
//prepare 資料庫從使用者過來 先設定統一為字串格式
$stmt = $dbn->prepare('INSERT INTO messages VALUES (NULL, ?, ?, ?, ?)');
$poster = 'poster' . $i;
$title = 'title' . $i;
$body = 'body' . $i;
$date = date('Y-m-d H:i:s', ++$now);
//ssss 代表????都為字串格式 (不管是數字或是字串 都把他存成字串格式)
$stmt->bind_param('ssss', $poster, $title, $body, $date);
$stmt->execute();
$stmt->close();
}
}
 
/*
* 取得資料
*/
$result = $dbn->query('SELECT * FROM messages');//取所有資料
while($data = $result->fetch_object()) {
echo '<pre>';                              
print_r($data);//印出資料庫所有資料
echo '</pre>';
}

cabuchi 發表在 痞客邦 留言(0) 人氣()

【網頁之間資料的傳遞 不同的傳遞方式】
1.http-> 表單post方法
2.URL-> 表單get方法

cabuchi 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。