NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Bug in .tpl Files with JavaScript and PhPED 4.6


Joined: 02 Aug 2006
Posts: 1
Reply with quote
Hello,
while I was seperating an old PHP Script with combined HTML, PHP and JS Code into a PHP File and Smarty template, I found a bug that crashed PhpEd.

A short Explanation how the bug works:
open a new smarty tpl File and then write:
<script type="text/javascript">
<?


As soon as I entered the ? my CPU usage increased to 99% and I had to shutdown PhpEd. I'm still using a Duron 800 with Windows 2000 SP4. It's not really a heavy Problem and encountered only because I had to migrate the old PHP file. This first happened when I tried to cut the HTML and JS code with some PHP echo's from the old File and paste them into the new tpl File which i wanted to rework afterwards by replacing the PHP Statements.
View user's profileFind all posts by jneumannSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I'm not sure why "<?" would ever appear in TPL files.
Tpls are supposed to be server-side-script free. It's just a well explained "separating presentation layer from data layer" paradigm. Please consult with Smarty manual first Smile
If nevertheless you need php in tpls you'd use {php blah blah blah}.

Regarding endless loop when <? is entered after <script in a tpl file, that's indeed a problem. Thanks, we'll fix it in build 4620.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Bug in .tpl Files with JavaScript and PhPED 4.6
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
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic