# 前後端整合 ### php 1. 把資料拿出來 2. 把資料跟 HTML 結合( UI )在一起 3. 回傳 HTML **browser render: 留言板** **server-side render** 瀏覽器一拿到 response 就直接顯示資料 ### API (純資料) 1. 把資料拿出來 2. 變成某種格式 (JSON) 3. 回傳 ### JS => render 瀏覽器一拿到資料顯示是空的,要透過 JS 動態產生資料後顯示出來 --- #### RESTful API 是一種API設計規則 路徑舉例: GET /comment => 所有留言 API GET /comments/:id => 單一留言 DELETE /comments/:id => 刪除留言 PATCH/PUT /comments/:id => 修改留言 POST /comments => 新增留言
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up