PHP http_response_code() İşlevi
Örnek
HTTP yanıtı durum kodunu 404 olarak ayarlayın:
<?php
http_response_code(404);
?>
Tanım ve Kullanım
http_response_code() işlevi, HTTP yanıt durum kodunu ayarlar veya döndürür.
Sözdizimi
http_response_code(code)
Parametre Değerleri
Parameter | Description |
---|---|
code | Optional. Specifies a response code (like 404) |
Teknik detaylar
Geri dönüş değeri: | Kod ayarlanmışsa, önceki durum kodu döndürülür . Kod ayarlanmazsa, mevcut durum kodu döndürülür |
---|---|
PHP Sürümü: | 5.4+ |
❮ PHP Ağ Referansı