Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Errror Urgent Fix Needed Please Thanks

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
theSpear
Smarty n00b


Joined: 19 Dec 2003
Posts: 3
Location: Atlanta, GA

PostPosted: Wed Mar 10, 2004 8:15 pm    Post subject: Errror Urgent Fix Needed Please Thanks Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
dthought
Smarty Regular


Joined: 21 Apr 2003
Posts: 55
Location: Melbourne, Australia

PostPosted: Thu Mar 25, 2004 12:38 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
knocte
Smarty Rookie


Joined: 30 Nov 2003
Posts: 23
Location: Spain, Europe

PostPosted: Sat Apr 03, 2004 11:02 am    Post subject: Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sat Apr 03, 2004 1:32 pm    Post subject: Reply with quote

knocte: http://smarty.php.net/manual/en/variable.php.handling.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website
knocte
Smarty Rookie


Joined: 30 Nov 2003
Posts: 23
Location: Spain, Europe

PostPosted: Sat Apr 03, 2004 4:36 pm    Post subject: Reply with quote

Hehe, didn't read that. Thx messju.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP