close

 

<?php

header('Content-Type: text/plain');
header('X-Test: foo');

function foo() {
foreach (headers_list() as $header) {
if (strpos($header, 'X-Powered-By:') !== false) {
header_remove('X-Powered-By');
}
header_remove('X-Test');
}
}

$result = header_register_callback('foo');
echo "a";
?>


上面的例子將輸出:
a

arrow
arrow
    全站熱搜

    stockwfj3 發表在 痞客邦 留言(0) 人氣()