mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
* .gitignore: Remove redundant entry * Minor optimizations with ternary operators * Use `const` instead of `define()` where appropriate `const` is quite faster because of the compile-time optimizations. Because the replaced statements are not declaring constant conditionally, it's safe to use `const` in all of these places. Closes GH-608.
13 lines
341 B
PHP
13 lines
341 B
PHP
<?php
|
|
$_SERVER["SERVER_ADDR"] = $_SERVER["HTTP_HOST"];
|
|
|
|
$filename = $_SERVER["PATH_INFO"] ?? $_SERVER["SCRIPT_NAME"];
|
|
|
|
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $filename)) {
|
|
/* This could be an image or whatever, so don't try to compress it */
|
|
ini_set("zlib.output_compression", 0);
|
|
return false;
|
|
}
|
|
|
|
include_once "error.php";
|