Compressing js & css files where mod deflate not available

血红的双手。 提交于 2019-12-11 13:54:33

问题


I'm using a shared 1and1 package for a Magento website and it seems I can't use the standard approach of compressing css and js files via htaccess. I came across this http://mrrena.blogspot.co.uk/2009/01/how-to-compress-php-and-other-text.html which gave an interesting approach which seems to work. However, I need to put a php.ini file in every directory that has css or js files that I want compressed. For something like Magento, this is quite a pain. Is there any way I can use a hierarchical approach such as with htaccess?


回答1:


I discovered the .user.ini file which does precisely what I want. So now I have a single .user.ini file in my root folder and I've removed all of the php.ini files.

See here for some detail: http://php.net/manual/en/configuration.file.per-user.php (none of the online documentation I could find on .user.ini was particularly good).



来源:https://stackoverflow.com/questions/24876371/compressing-js-css-files-where-mod-deflate-not-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!