PHP die() İşlevi
Örnek
Bir mesaj yazdırın ve mevcut komut dosyasını sonlandırın:
<?php
$site = "https://www.w3schools.com/";
fopen($site,"r")
or die("Unable to connect to $site");
?>
Tanım ve Kullanım
die() işlevi, exit() işlevinin bir diğer adıdır.
Sözdizimi
die(message)
Parametre Değerleri
Parameter | Description |
---|---|
message | Required. A message or status number to print before terminating the script. A status number will not be written to the output, just used as the exit status. |
Teknik detaylar
Geri dönüş değeri: | Hiçbir şey değil |
---|---|
PHP Sürümü: | 4+ |
❮ PHP Çeşitli Referans