⊗ppPmHpSL 402 of 447 menu

Sending the HTTP Response Start Line in PHP

Using the header function, you can also send the start line of the HTTP response. This is typically used to specify the status. Mainly for the 404 error:

<?php header('HTTP/1.1 404 Not Found'); ?>

Complete the code so that it sends the 404 error header:

<?php $arr = ['a', 'b', 'c']; $key = $_GET['key']; if (isset($arr[$key])) { echo $arr[$key]; } else { // send 404 echo 'error'; } ?>
English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline