|
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 |
theSpear Smarty n00b
Joined: 19 Dec 2003 Posts: 3 Location: Atlanta, GA
|
Posted: Wed Mar 10, 2004 8:15 pm Post subject: Errror Urgent Fix Needed Please Thanks |
|
|
PHP doing some weird stuff...
I got php_passthru on and stuff.. i got some php code working with includes, but this is being weird..
http://www.oddballin.com/images.php
last line of the file that the file includes is
echo "test";
well actually.. ?> but the test is last thing to rpint.. and between that and the newxt line of my template file.. it prints all that stuff.. i close the {/php} and then </td> no idea where all that text is coming from.
'pl;ppppppppppppppppppppppppppppppppppppppp;p ''''''''''''''''''''''''''''''hhhhhhhhhhh'' ' ;l,.;ghjkl;plkghjk yt fg _________________ My Personal Blog |
|
Back to top |
|
dthought Smarty Regular
Joined: 21 Apr 2003 Posts: 55 Location: Melbourne, Australia
|
Posted: Thu Mar 25, 2004 12:38 am Post subject: |
|
|
If you have to use the {php} tags in Smarty, you haven't designed your system properly. Use {php} as an utter, last ditch, can't-possibly-do-it-any-other-way-at-all fix only.
So far I've never found a place where I've had to use the evil {php} tag, so the best I can suggest is - figure out what you want your PHP to do, and then figure out how you can pass it to Smarty.
If you're doing dynamic PHP images, make a separate PHP file to generate your image, and include it as you would any other image - eg.
<img src="myimagemaker.php?params=whatever" /> |
|
Back to top |
|
knocte Smarty Rookie
Joined: 30 Nov 2003 Posts: 23 Location: Spain, Europe
|
Posted: Sat Apr 03, 2004 11:02 am Post subject: |
|
|
I agree with you, dthought. By the way, I think that "{php}" tag shouldn't be allowed by default. Because sometimes we, as PHP coders, work with other people, sometimes web designers, and we often can't control what they are coding. If they find a problem, they use {php} instead of asking us some data to be passed to the template. This situation should be controlled by the PHP coder, something like an attribute where we could allow or forbid this tag, don't you think?
Regards. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
knocte Smarty Rookie
Joined: 30 Nov 2003 Posts: 23 Location: Spain, Europe
|
Posted: Sat Apr 03, 2004 4:36 pm Post subject: |
|
|
Hehe, didn't read that. Thx messju. |
|
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
|