1. Home
  2. Computer Science MCQs
  3. PHP
  4. PHP files have a default file extension of..

Added 19 Jan 2024

PHP files have a default file extension of..

  1. .html
  2. .xml
  3. .php Correct answer
  4. .ph

Correct answer

C. .php

12 views

MCQSEXAM

Explanation

PHP files use the .php extension by default. The web server is configured to pass any file ending in .php to the PHP interpreter, which runs the code on the server and returns plain HTML to the browser.

Files saved as .html or .xml are normally sent as they are, so PHP code inside them would not be executed unless the server is specially configured.

For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs