Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorjustnajm
    • CommentTimeDec 30th 2006
     
    I have used the php include function in my pages. Also have include the similar files twice some times, and I am unable to figure out that how the include function works and how can I use only one include to solve the problem.

    I also need to know the difference between require() and include().
    • CommentAuthorjiosis
    • CommentTimeJan 30th 2007
     
    Hi,

    using include_once() will check if the file is already included or not. if yes it won't do it again in the same page otherwise it will be exactly same as include();

    include() and require() are same in everything except on small but important differece.

    if your include() fails to find/read the specified file it will generate a Warning but in case of require() it will cause a Fatal Error !

    Hope it helps,
    Cheers