Mar 19
One can determine if it is possible to send HTTP headers from within your PHP script using which of the following functions?
Aşağıdaki hangi fonksiyon bir PHP Script’ten HTTP header göndermenin olanaklı olup olmadığını belirleyebilir?
apache_headers_enabled()
is_headers_enabled()
is_headers_sent()
headers_enabled()
Cevap:
Döndürdüğü Değerler:
True & False
Örnek Kullanım:
// Eğer header gönderilmemişse, yeni gönder
if (!headers_sent()) {
header(‘Location: http://www.orneksite.com/’);
exit;
}
if (!headers_sent()) {
header(‘Location: http://www.orneksite.com/’);
exit;
}
Ayrıca İnceleyin:

Son Yorumlar