Website Structure

后端 未结 9 690
无人及你
无人及你 2021-02-04 19:43

I\'m pretty new to php and i\'m trying to decide the best way to organize the pages and, using PHP, deliver them. The two (basic) ideas I\'ve had are:

  • A bunch o

9条回答
  •  独厮守ぢ
    2021-02-04 19:59

    Given those two choices I would go with number 2. If your site grows to a level that you need a proper framework, moving the single pages without all of the include('header.php'); stuff will be a lot easier. For bonus points use model and view folders in which to put db access and display logic respectively and you're half way to a true MVC environment.

    edit to add- a single index with conditional includes also gives your app a single point of entry which can be very valuable for security.

提交回复
热议问题