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 # 啟動伺服器 $ php -S 127.0.0.1:8000 -t htdocs # 進入命令列 $ php -d auto_prepend_file=$PWD/htdocs/config.php -a php > require_once FOLDER_ROOT.'/lib/Database/DbMessage.php'; php > $db = new MessageBoard\Database\DbMessage(); php > print_r($db->getList()); # 檔案結構 * index.php 列表(包含分頁) * edit.php 編輯 * view.php 瀏覽 # 題目要求 下週五code review的小作業:請使用原生寫法(不得使用任何框架),用 html + css + php + mysql 寫出簡易的留言版系統 要求: 1. 有列表,帶分頁(分頁形式不拘) 2. 新增/編輯/刪除留言功能 3. 資料存在MySQL 4. css盡量使用,畫面別太醜 本機沒環境的話,請裝xampp for mac