when to use index.php instead of index.html

后端 未结 11 2397
星月不相逢
星月不相逢 2020-12-01 02:58

I am relatively new to php. There is a very basic thing that has been troubling me. I understand that php is used to make web sites dynamic. I also understand that php is on

11条回答
  •  甜味超标
    2020-12-01 03:49

    You can use which-ever you prefer: If you prefer keeping forms and basic pages that don't use data in HTML, and keep pages that use php in php format that is fine.

    But one method I and I assume most others use is just make all of your pages php files. This is because you can include a html document in the php file and display it just the same. But you cannot do php queries from a html file so it is easy to just always use php just incase you want to add some php scripts to it.

    Index.php:

    
    
    
    My Page
    
    
    

    Your variable was

提交回复
热议问题