Jill 筆記
:::
:::
所有書籍
「PHP 從頭說」目錄
MarkDown
2-1 index.html
1. 安裝PHP開發環境與BootStrap響應式框架
1-1 index.html
2. PHP基本語法 V.S Smarty樣板
2-1 index.html
2-2 index.php
2-3 demo.php
2-4 index.tpl
3. 資料庫規劃與表單製作
3-1 index.php
3-2 header.php
3-3 footer.php
3-4 templates/header.tpl
3-5 template/navbar.tpl
3-6 index.tpl
3-7 function.php
3-8 templates/post_form.tpl
4. 表單函數與資料庫存取
4-1 post_form.tpl
4-2 index.php
4-3 index.tpl
4-4 array($result->fetch_assoc())
4-5 array:$result->fetch_row()
5. 資料的讀取、編輯修改及刪除
5-1 index.php
5-2 header.php
5-3 footer.php
5-4 templates/index.tpl
5-5 templates/show_one.tpl
5-6 templates/post_form.tpl
6. 檢查必填欄位與常用小工具
6-1 index.php
6-2 templates/post_form.tpl
6-3 templates/show_one.tpl
6-4 templates/index.tpl
6-5 templates/sweetalert_delete.tpl
2-3 demo.php
PHP 從頭說 ======= ```php '回首頁','post' => "發布待辦事項" ); //二維陣列 //法一 // $content[1]['done'] = "完成"; // $content[1]['directions'] = "撰寫程式"; // $content[1]['end'] = "2021/03/13"; // $content[1]['priority'] = "低"; // $content[1]['asign'] = "李大頭"; // $content[2]['done'] = "完成2"; // $content[2]['directions'] = "撰寫程式2"; // $content[2]['end'] = "2021/03/13"; // $content[2]['priority'] = "低2"; // $content[2]['asign'] = "李大頭2"; // 法二 // $content=array( // '1' => array('done' => '完成', 'directions'=> "撰寫程式",'end' => '2021/03/13', 'priority'=> "低",'asign'=> "李大頭"), // ); // 法三 $content=[ '1' => ['done' => '完成', 'directions'=> "撰寫程式",'end' => '2021/03/13', 'priority'=> "低",'asign'=> "李大頭"], '2' => ['done' => '未完成', 'directions'=> "開會",'end' => '2021/03/20', 'priority'=> "高",'asign'=> "李大頭、吳大大"], '3' => ['done' => '未完成', 'directions'=> "社大上課",'end' => '2021/03/21', 'priority'=> "高",'asign'=> "李大頭、吳大大、郭大大"], ]; // 將變數送到Smarty樣板檔 $smarty->assign('page_title', $page_title); $smarty->assign('header', $header); $smarty->assign('navbar', $navbar); $smarty->assign('content', $content); // 呈現在哪個檔案 templates/xxx.tpl $smarty->display('index.tpl'); ```