Lidemy / mentor-program-2nd-futianshen

mentor-program-2nd-futianshen created by GitHub Classroom
14 stars 2 forks source link

Week5 #10

Closed futianshen closed 5 years ago

futianshen commented 5 years ago

總算完成了! 總算能體會我們在養蟲,蟲也在養我們的感覺。 http://mentor-program.co/futianshen/week5/index.html

本周遇到問題

  1. 網頁 sql 語法太長了不好閱讀,有沒有比較好的寫法,比如說用字串拼接會比較好嗎?
  2. PHP 和 HTML 混在一起要怎麼排版增加可讀性,我目前是讓 PHP 語法沒有縮排,比較好區分。
  3. 如果改 .php 附檔名為 .html 伺服器是不是就會跳過處理?
aszx87410 commented 5 years ago

大致上都 ok 然後關於你碰到的那三個問題:

  1. sql 語法的話用像是 template string 那種方法會比較好,可參考:http://www.jollen.org/php/jollen_php_book_42.html
  2. 其實很難增加可讀性XD
  3. 是,因為 server 一般只會處理.php檔案,除非有特別調過設定