Why aren't PHP files used for (custom) CSS and JS?

后端 未结 8 1149
旧时难觅i
旧时难觅i 2020-12-15 22:27

Why don\'t people make .php files for their CSS and JavaScript files?

8条回答
  •  抹茶落季
    2020-12-15 23:12

    PHP is often used as a processor to generate dynamic content. It takes time to process a page and then send it. For the sake of efficiency (both for the server and time spent in programming) dynamic JS or CSS files are only created if there isn't a possible way for the static file to successfully accomplish its intended goal.

    I recommend only doing this if absolutely you require the assistance of a dynamic, database driven processor.

提交回复
热议问题