如何保存自定义标头


How save custom header?

我正在尝试设置这样的自定义标头:

header($_SERVER['Example']);

但是当我这样做时:var_dump($_SERVER);没有Example标题。我还想在标题中添加一些内容。我怎样才能做到这一点?

$_SERVER只是一个数组,为什么不呢?

$_SERVER['Example'] = 'hello';
var_dump( $_SERVER );