« Previous Next »

Thread: Different include_once, require_once PHP

Last post 07-25-2009 1:00 PM by kateroh. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 07-09-2009, 3:32 AM

    Different include_once, require_once PHP

      Normal 0

    Hi proficient,

         Could an anybody give a description of different between include_once, require_once in PHP with An Example program, an already I have search this but I can’t take that example so anybody tell description to me for this question.

     

                                          Thanks in advance for your help.

    Regards,

    Gilbertsavier.

    Live chat By mioot

  • 07-25-2009, 1:00 PM In reply to

    Re: Different include_once, require_once PHP

    The difference is the same as between require() and include(). From PHP Manual:

    "require() is identical to include() except upon failure it will produce a fatal E_ERROR level error."

    Meaning that execution of your script will stop in case of require_once() failure, whereas execution of your script will continue in case of include_once() failure. 

    Addition of _once to both functions means that if multiple scripts include the same file, it will be added/executed only once.

     

    Thanks,
    Katerina Rohonyan, SDET, Microsoft IIS Team
Page 1 of 1 (2 items)
Microsoft Communities