[請益] MVC的問題
爬過板上的文章也請教過google大師了
不過通常都是架構
除了架構之外還是一頭霧水
不知道model , view , controler裡面的code要如何寫才符合
所以希望版友能給個簡單的範例
類似像留言板的mvc架構要如何寫
我寫的是在controller裡面寫個表單
如:
<form method="post" action="model.php">
<textarea name="message"></textarea>
<input type="text" name="author" />
<input type="submit" />
<input type="reset" />
</form>
而model.php則是:
$message = $_POST['message'];
$author = $_POST['author'];
再將$message和$author利用表單傳給view.php
而view.php在echo出來
不過感覺好像又不是這樣...
只覺得中間多一層controller而已
希望有板友可以幫我解答一下
先謝謝了~~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.139.145.251
→
11/02 00:32, , 1F
11/02 00:32, 1F
→
11/02 00:32, , 2F
11/02 00:32, 2F
→
11/02 01:47, , 3F
11/02 01:47, 3F
→
11/02 01:47, , 4F
11/02 01:47, 4F
→
11/02 01:48, , 5F
11/02 01:48, 5F
→
11/02 02:43, , 6F
11/02 02:43, 6F
討論串 (同標題文章)