Dynamic URLs in CSS/JS

后端 未结 9 1034
别跟我提以往
别跟我提以往 2021-02-05 16:14

I\'m splitting up one of my larger apps and introducing a \'cdn\' url to house common objects like CSS, javascript, and images to avoid duplication. What I need to do, though, i

9条回答
  •  自闭症患者
    2021-02-05 16:29

    Depending on your server configuration, you can also append the .php-extension to your filenames and have them treated as PHP scripts too:

    I.E.: style.css.php would contain:
    
    .cool-button { background-image url(); }
    

    This also works for JavaScript-files.

提交回复
热议问题