How does the exit command affect the execution of included files in PHP scripts?

When the exit command is called in a PHP script, it immediately terminates the script's execution, including any included files. To prevent included files from being affected by the exit command, you can use the die() function instead, which also terminates the script but allows included files to continue executing.

// Using die() instead of exit to prevent included files from being affected
include 'included_file.php';

// Instead of using exit
die();