mirror of
https://github.com/mrclay/minify.git
synced 2025-01-17 21:28:14 +01:00
Adds server-info.php
This commit is contained in:
parent
9eaef368e0
commit
1c3c370dd4
@ -61,6 +61,10 @@ $min_serveOptions['minApp']['allowDirs'] = array(
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### What's my document root?
|
||||||
|
|
||||||
|
You can enable the script `min/server-info.php` and open http://example.org/min/server-info.php to find useful `$_SERVER` values. People in the [Google Group](https://groups.google.com/forum/#!forum/minify) might need these to help you.
|
||||||
|
|
||||||
## It's still not working
|
## It's still not working
|
||||||
|
|
||||||
1. Make sure you have the [latest version](http://code.google.com/p/minify/downloads/list).
|
1. Make sure you have the [latest version](http://code.google.com/p/minify/downloads/list).
|
||||||
|
25
min/server-info.php
Normal file
25
min/server-info.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Reports server info useful in configuring the options $min_documentRoot, $min_symlinks,
|
||||||
|
* and $min_serveOptions['minApp']['allowDirs'].
|
||||||
|
*
|
||||||
|
* Change to true to expose this info.
|
||||||
|
*/
|
||||||
|
$enabled = false;
|
||||||
|
|
||||||
|
///////////////////////
|
||||||
|
|
||||||
|
if (!$enabled) {
|
||||||
|
die('Set $enabled to true to see server info.');
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Content-Type: text/plain');
|
||||||
|
|
||||||
|
$file = __FILE__;
|
||||||
|
echo <<<EOD
|
||||||
|
__FILE__ : $file
|
||||||
|
SCRIPT_FILENAME : {$_SERVER['SCRIPT_FILENAME']}
|
||||||
|
DOCUMENT_ROOT : {$_SERVER['DOCUMENT_ROOT']}
|
||||||
|
SCRIPT_NAME : {$_SERVER['SCRIPT_NAME']}
|
||||||
|
REQUEST_URI : {$_SERVER['REQUEST_URI']}
|
||||||
|
EOD;
|
Loading…
x
Reference in New Issue
Block a user