|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Jamarchi Smarty Rookie
Joined: 06 Sep 2018 Posts: 11
|
Posted: Wed Nov 07, 2018 6:45 pm Post subject: What is wrong ? |
|
|
Hi
Iīm starting and I need to add some variables in one page
Code: | {include_php file="/info/variables.php"}
{php}
$tittle=2;
echo $tittle02;
$tittle=2;
if ($tittle==1){
echo $tittle01;
}else{
echo $tittle02;
}
{/php} |
I tried to include a file variable.php that I have to show depend other information, in this case I will show the variable $tittle02 but I canīt see anything
I donīt know if the include has problem....
What can be wrong ?
Thank you |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Nov 08, 2018 4:20 am Post subject: |
|
|
Insertion of raw PHP code is not supported for several years now. |
|
Back to top |
|
Jamarchi Smarty Rookie
Joined: 06 Sep 2018 Posts: 11
|
Posted: Thu Nov 08, 2018 1:02 pm Post subject: |
|
|
Hi AnrDaemon
Ah ok thank you, so what is the correct way to do this ?
thank you |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Nov 09, 2018 4:42 pm Post subject: |
|
|
Write your PHP code in your program.
Or write a proper Smarty plugin and register it to Smarty. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|