Multiple choice technology

What is the correct way to include the file "time.inc" ?

  1. <!--include file="time.inc"-->

  2. <?php include_file("time.inc"); ?>

  3. <?php require("time.inc"); ?>

  4. <% include file="time.inc" %>

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In PHP, require() is used to include a file, and the file will cease processing if it cannot be found - this is the correct syntax shown in option C. Option A shows HTML comment syntax, option B uses a non-existent function include_file(), and option D shows ASP-style syntax which is not standard PHP.