输出讯息并中断 PHP 程式。
语法: void die(string message);
传回值: 无
函式种类: PHP 系统功能
本函式将送出字串到浏览器并中断 PHP 程式 (Script)。参数 message 为欲送出的字串。
下例中,若无法开启 /etc/shadow 时,传给浏览器抱歉,无法开启: /etc/shadow。<?php$filename = "/etc/shadow";$file = @fopen($filename, 'r') or die("抱歉,无法?/font>}启: $filename");echo "本行不会执行";?>