From 739cb7b9a15b7af40d9ec119754a1b60ba863e43 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Wed, 8 Apr 2020 23:59:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 7 ++++++- htdocs/config.sample.php | 2 +- htdocs/index.php | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Readme.md b/Readme.md index 3e6fa5d..439a40c 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,12 @@ JGB Yuan 練習作業 === # 安裝方法 -待補充 +## 1. 建立資料庫 + $ mysql -u yuan -p + mysql> CREATE DATABASE `yuanjgb-mb`; + mysql> exit; + $ mysql -u yuan -p yuanjgb-mb < install.sql + $ cp htdocs/config.sample.php htdocs/config.php # 啟動伺服器 ··· diff --git a/htdocs/config.sample.php b/htdocs/config.sample.php index c77ea79..79fdc87 100644 --- a/htdocs/config.sample.php +++ b/htdocs/config.sample.php @@ -34,7 +34,7 @@ * * 每一張表格名稱的起始字串,為了避開一些網頁空間只允許建立一個資料庫的限制。 */ - define('DB_PREFIX', 'mg__'); + define('DB_PREFIX', ''); // 網站設定 =================================================================== /** diff --git a/htdocs/index.php b/htdocs/index.php index 6cc53c1..d06d75a 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -55,9 +55,9 @@ $list = [ foreach ($list as $key => $item) { echo ' - id - title - updated_at + '.$item['id'].' + '.$item['title'].' + '.$item['updated_at'].'