Q. Which of the following functions is used to get the current script name in PHP?

  • (A) $_SERVER['PHP_SELF']
  • (B) $_SERVER['SCRIPT_NAME']
  • (C) $_SERVER['SERVER_NAME']
  • (D) Both $_SERVER['PHP_SELF'] and $_SERVER['SCRIPT_NAME']
πŸ’¬ Discuss
βœ… Correct Answer: (D) Both $_SERVER['PHP_SELF'] and $_SERVER['SCRIPT_NAME']
Explanation: Both $_SERVER['PHP_SELF'] and $_SERVER['SCRIPT_NAME'] provide the current script name.
Explanation by: Rati Dubey
Both $_SERVER['PHP_SELF'] and $_SERVER['SCRIPT_NAME'] provide the current script name.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
75
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
85%
Success Rate