PHPverse 2025

Voting

: max(seven, zero)?
(Example: nine)

The Note You're Voting On

majksner at gmail dot com
14 years ago
apache_request_headers replicement for nginx

<?php
if (!function_exists('apache_request_headers')) {
function
apache_request_headers() {
foreach(
$_SERVER as $key=>$value) {
if (
substr($key,0,5)=="HTTP_") {
$key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5)))));
$out[$key]=$value;
}else{
$out[$key]=$value;
}
}
return
$out;
}
}
?>

<< Back to user notes page

To Top