源文件更改后,Minify返回白页

Chr*_*ris 7 php minify

Minify对我来说很好,但在更改其中一个源文件后,我会收到一个白色的空白页面.刷新页面不会改变任何内容.没有缓存的刷新(Strg + F5)解决了这个问题.在没有缓存的一次刷新之后,我可以通过缓存重新刷新并且它可以工作.

URL im调用如下所示:

开发/分钟/ min.php/JS?类型= JS&SRC%5B0%5D = ewOutlibs%2Fjquery.min.js&SRC%5B1%5D = ewOutlibs%2Fcookie%2Fjquery.cookie.js

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();
}
Run Code Online (Sandbox Code Playgroud)

请求标题:

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
Run Code Online (Sandbox Code Playgroud)

响应标题:

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,phtml,php3; path=/
Run Code Online (Sandbox Code Playgroud)

Chr*_*ris 1

stage 系统上的 tmp 目录不可写,因此 Minify 缓存文件失败并返回白页。愚蠢的错误。本地工作正常,因为 tmp 目录按预期工作。