I am developing a website that many pages share the same开发者_JAVA技巧 header/footer/sidebar/topbar.
Say I have three pages: one/index.php, second/index.php, third/index.php. They all share the same header/footer/sidebar.
The problem is where should I put the header/etc and its corresponding css file, since a piece of html code could not import css file.
What's a good way to modularize php/html page? Is there any good tutorial?
Sounds like you may want a MVC framework and a template engine. Check out CodeIgniter, or TinyMVC with Smarty. Call external stylesheets with:
    <LINK href="special.css" rel="stylesheet" type="text/css">
You can use the PHP include statement to insert your header/footer/sidebar files where they need to be inserted in your other PHP pages.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论