Results 1 to 3 of 3

What is the main difference between require() and require_once()?

This is a discussion on What is the main difference between require() and require_once()? within the Web Design forums, part of the Web Designing & Development category; What is the main difference between require() and require_once()?...

  1. #1
    Senior Member johnslater11's Avatar
    Join Date
    Feb 2012
    Location
    Coimbatore
    Posts
    296

    Default What is the main difference between require() and require_once()?

    What is the main difference between require() and require_once()?

  2. #2
    Member
    Join Date
    Jun 2013
    Posts
    36

    Default Re: What is the main difference between require() and require_once()?

    Very simple: With require() you can include a file multiple times. While additional calls to require_once with the same argument is simply ignored.
    or we can say
    require() includes and evaluates a specific file, while require_once() does that only if it has not been included before (on the same page).

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    26

    Default Re: What is the main difference between require() and require_once()?

    we include the php file to using require() & require_once() but require_once() is the best and secure way and health full for your site

Tags for this Thread