phpphp-include

What is the difference between include and parsedinclude


What is the difference between using

   <?php include("filename.inc"); ?>  

and

    <%parsedinclude(filename.inc)%> 

Both work, but I'm curious about the < ? and < % convention, and this is a hard question to phrase for Google.

And also the difference between php include and parsedinclude


Solution

  • To answer your first question, <?php is the normal PHP open tag while <% is a variant of it that is used in Nucleus CMS (an open-source blog management software package written in PHP).


    Regarding the second question, parsedinclude is a function in Nucleus CMS, and is not valid in normal PHP.

    Function of parsedinclude: (quoted from Nucleus CMS Documentation)

    Includes a file into the output. The contents of the file is parsed by the Nucleus skin/template parser, so you can use skin/templatevars. (see phpinclude and include for other include options)

    Function is include: (quoted from Nucleus CMS Documentation)

    Includes a textfile into the output. The contents of the file is not parsed in any way, so you cannot use skin/templatevars or use PHP code (see parsedinclude and phpinclude if you want parsed includes)