脚本宝典收集整理的这篇文章主要介绍了php – Minify在源文件更改后返回白页,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
URL im调用如下所示:
min.PHP
<?PHP define('minify_MIN_DIR',dirname(__FILE__)); // load config require MINIFY_MIN_DIR . '/config.PHP'; // autoload require $min_libPath . "/Minify/Loader.PHP"; Minify_Loader::register(); // caching Minify::setCache( isset($min_cachePath) ? $min_cachePath : '',$min_cacheFileLocking ); // get files to merge $aSrc = $_GET['src']; // replace shortened url wITh long url if (isset($_GET['tyPE']) && $_GET['type'] === 'js') { $aSrc = str_replace('ewOut','//out/xxx/src/js/',$aSrc); } // build array $aSources = array( 'files' => $aSrc,'maxAge' => 31536000 // one year ); try { // comPress,merge and serve new file Minify::serve('Files',$aSources); } catch (Exception $e) { echo $e->getMessage(); }
请求标题:
Accept:text/htML,application/xhtml+XMl,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding:gzip,deflate,sdch Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4 Cache-Control:max-age=0 Connection:keep-alive Cookie:oxidadminPRofile=0%40Standard%4010%401; oxidadminlanguage=de; sid_key=oxid; language=0; sid=crlrs8bqg21g6e33arsjq708k4; ZDEDebuggerPresent=PHP,phtml,PHP3 Host:dev.teltec If-Modified-since:Tue,04 Aug 2015 12:35:59 GMT If-None-Match:"pub1438691759;gz" Upgrade-insecure-Requests:1 User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) Applewebkit/537.36 (KHTML,like Gecko) Chrome/44.0.2403.125 Safari/537.36
响应标题:
HTTP/1.1 304 Not Modified Date: Tue,04 Aug 2015 12:36:04 GMT Server: apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/0.9.8o mod_fcgid/2.3.9 Connection: Keep-Alive Keep-Alive: timeout=5,max=99 ETag: "pub1438691759;gz" Expires: Wed,03 Aug 2016 12:36:04 GMT Cache-Control: max-age=31536000 VARy: Accept-Encoding Set-Cookie: ZDEDebuggerPresent=PHP,PHP3; path=/
我遇到了同样的问题,我提供给一个客户端的XML源,这个客户端不断获得相同的副本,直到我在最后添加了一个版本号,迫使浏览器总是获取一个新文件
以上是脚本宝典为你收集整理的php – Minify在源文件更改后返回白页全部内容,希望文章能够帮你解决php – Minify在源文件更改后返回白页所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。