In PHP, exit means exit; the exit() function is used to output a message and exit the current script. It is an alias of the die() function, and the syntax is "exit(message)"; where The parameter specifies a message or status number to be written before exiting the script, and the status number will not be written to the output.
The operating environment of this article: Windows 10 system, PHP version 8.1, Dell G3 computer
exit(message)
<?php $site = "http://www.w3school.com.cn/"; fopen($site,"r") or exit("Unable to connect to $site"); ?>
PHP Video Tutorial"
The above is the detailed content of What does exit mean in php?. For more information, please follow other related articles on the PHP Chinese website!