PHP缩小子目录中的崩溃-WAMP

PHP缩小子目录中的崩溃-WAMP,php,apache,wamp,minify,Php,Apache,Wamp,Minify,我按照上面列出的PHP Minify指令使用子目录,但它只是在我的测试URL上返回了一个400错误的请求错误。关于如何解决这个问题有什么想法或线索吗 我遵循的步骤 相对于我的“演示站点”根目录放置最小文件夹 按照上的指示,在下面添加了代码段 运行URL测试,返回400错误请求错误 更多信息 服务器:Wamp PHPV5.3 服务器上的位置:var/www/demo site 提供400错误的URL: 放在config.php中的代码 // Set the document root to be

我按照上面列出的PHP Minify指令使用子目录,但它只是在我的测试URL上返回了一个400错误的请求错误。关于如何解决这个问题有什么想法或线索吗

我遵循的步骤

  • 相对于我的“演示站点”根目录放置最小文件夹
  • 按照上的指示,在下面添加了代码段
  • 运行URL测试,返回400错误请求错误
  • 更多信息

    服务器:Wamp PHPV5.3

    服务器上的位置:var/www/demo site

    提供400错误的URL:

    放在config.php中的代码

    // Set the document root to be the path of the "site root"
    $min_documentRoot = substr(__FILE__, 0, -15);
    
    // Set $sitePrefix to the path of the site from the webserver's real docroot
    list($sitePrefix) = explode('/min/index.php', $_SERVER['SCRIPT_NAME'], 2);
    
    // Prepend $sitePrefix to the rewritten URIs in CSS files
    $min_symlinks['//' . ltrim($sitePrefix, '/')] = $min_documentRoot;
    

    在我使用的Minify版本中,您必须通过搜索找到以下行(如下面的代码示例所示),并在config.php中替换它们。简单地将这些代码复制并粘贴到config.php中,就会破坏一切。这是出乎意料的,因为在编写本文时,文档中几乎都说复制并粘贴代码段

    // Search for...
    $min_documentRoot = '';
    // Replace with...
    $min_documentRoot = pathinfo(pathinfo(__FILE__, PATHINFO_DIRNAME), PATHINFO_DIRNAME);
    
    // Search for...
    $min_symlinks = array();
    // Replace with...
    list($sitePrefix) = explode('/min/index.php', $_SERVER['SCRIPT_NAME'], 2); 
    $min_symlinks['//' . ltrim($sitePrefix, '/')] = $min_documentRoot;