2

When I was writing my code in PHP and typed require instead include, I saw there was no difference between them so I want to know the main difference between include_once and require_one and include and require.

Pranav MS
  • 2,235
  • 2
  • 23
  • 50
Pooja Khatri
  • 550
  • 5
  • 11

1 Answers1

0

require() and require_once() perform the same task except that the second function checks if the PHP script is already included or not before executing it.

(same for include_once() and include())

Pranav MS
  • 2,235
  • 2
  • 23
  • 50