You have a PHP script and you need to include a file, but you want to continue execution of the script even if the file is not found. Which statement would you use and why?

  • include()
  • require()
  • include_once()
  • require_once()
To include a file in your PHP script and continue execution even if the file is not found, you would use the include() statement. If the file is not found, a warning will be generated, but the script execution will continue without causing a fatal error.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *