• Dec 02 Fri 2011 22:49
  • 清單


  • 可燒錄外接光碟機

  • 外接硬碟500G UP

  • 手機(沒辦法,誰叫我手機在美國泡水死了。)

  • G2(現在鏡頭嚇死人,可是我去Time Square想到沒雞兔拍就心癢癢。)

  • T2(從大二念到現在還是沒入手。)

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

    root@trainer:/var/lib# sudo apt-get install mysql-server
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    mysql-server is already the newest version.
    The following packages were automatically installed and are no longer required:
      mysql-client
    Use 'apt-get autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
    2 not fully installed or removed.
    E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
    E: Unable to lock the download directory

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

    自動轉向有兩種寫法如下:
    <META HTTP-EQUIV='refresh' CONTENT='秒數; URL=網址'>
     
    現在在a網頁 然後現在要跳到c網頁去 可是送出a網頁其實應該是跳到b網頁

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

     
    官方載點:http://www.ganttproject.biz/
    免安裝中文版:http://azo-freeware.blogspot.com/2008/01/ganttproject-206.html

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

    圖檔
    [原本只能.rar,變更成.doc也可上傳設定]
    管理員控制台(ACP) → 發表 → 附加檔案的"管理副檔名群組"
    → 選擇 Documents 後面的編輯圖示 → 勾選"允許" → 送出。

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

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

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

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

    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) 人氣()

    <?php
    這裡面放PHP的資料
    他會先傳到web伺服器做解譯的動作
    再解譯後轉成html文件  回傳到用戶端瀏覽器上面顯示

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

    1. PHP 使用的web伺服器為apache
    2.最佳組合LAMP:
       LINUX -OS
       Apache -web server(也可以用IIS ASP只能用IIS開啟)

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

    1 2
    Blog Stats
    ⚠️

    成人內容提醒

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

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