I am trying to fing out how to include files. I have tried using {include file="Filename"}. But I always get this type of error message: "Smarty error: unable to read resource: "guitar/inc-filer/Rhythm.inc.php""
How do I include files?
{include} tag
-
cyberman
Re: {include} tag
Is this the ful file path from root directory?
olavt wrote: "guitar/inc-filer/Rhythm.inc.php""
-
olavt
Re: {include} tag
Yes, from the root guitar/inc-filer/Rhythm.inc.php is the full path.cyberman wrote: Is this the ful file path from root directory?
olavt wrote: "guitar/inc-filer/Rhythm.inc.php""
I have installed CMSMS in the /guitar directory. I have also tried with inc-filer/Rhythm.inc.php (the CMS directory as root), but both give the same error message.
-
cyberman
Re: {include} tag
Think, there's something wrong with path. From Smarty doc
If not you should try {include_php} instead. But be warned - this tag is deprecated. The easiest will be to use a user defined tag.
Is Rhythm.inc.php a template file?{include} tags are used for including other templates in the current template.
If not you should try {include_php} instead. But be warned - this tag is deprecated. The easiest will be to use a user defined tag.
-
olavt
Re: {include} tag
It is not a template file (to be honest, I am not sure what a template file is). It is an ordinary text file. The path works if I include it in a user defined tag. But I think I will use user defined tags and forget about include problems.
-
cyberman
Re: {include} tag
Please make a look at smarty docu - the "root" for include tag is template dir so you have to modify path.
