SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up PHP: include & require, what is diff

    Hope this is not stupid question.

    I read the manual frequently, still could not understand what different between include() and require(), it makes no different to me.

    Could you show me in an example script to show the different result between those two? Thanks.

  2. #2
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,000
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It has a difference in how they handle failure. require and require_once will produce fatal error and stop the script and include and include_once just a warning which means that script will continue executing.
    -- Jelena --


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •