[英]If PHP sends two headers, which will be effective?
如果我有兩個標題,例如:
header("Cache-Control: public");
header("Cache-Control: private");
哪個有效(第一個或最后一個)?
在此腳本中,將使用第二個header():
<?php
header('Location: http://google.de');
header('Location: http://stackoverflow.com');
在腳本上,將使用第二個header():
<?php
header("Cache-Control: public");
header("Cache-Control: private");
如果頭被多次定義,將使用最后一個頭!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.