PHP Routing - stylesheets have no effect

后端 未结 1 617
生来不讨喜
生来不讨喜 2021-01-27 10:24

I have created a basic Routing-system in PHP. The url is split into an array, so that i can decide what to show depending on the URL (ex: www.domain.com/page/option/param).

1条回答
  •  清歌不尽
    2021-01-27 10:46

    With most rewriting of "fake" or friendly URL's, you need to specify the location of the stylesheet either using absolute path or using the base tag in the head section.

    e.g.

    
    
    //The CSS file above will load from http://example.com/css/style.css
    

    OR

    You can add a back slash before the path in the link tag so that it starts at the root directory.

    
    

    0 讨论(0)
提交回复
热议问题