Which of the following are ways to include a file in PHP?

  • include() and require()
  • require_once() and include()
  • include_once() and require_once()
  • include() and include_once()
The correct options for including a file in PHP are include() and require(). Both statements allow you to include a file into the current PHP script. require_once() and include_once() also provide similar functionality, but they ensure that the file is included only once to avoid redundancy.
Add your answer
Loading...

Leave a comment

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