TinyPortal

Development => Block Codes => Topic started by: dismal shadow on March 27, 2010, 03:18:07 PM

Title: php on TP
Post by: dismal shadow on March 27, 2010, 03:18:07 PM
<?php
?>

Does not work on TP even on "php code"
Title: Re: php on TP
Post by: Skhilled on March 27, 2010, 03:32:46 PM
You mean in a block? You do not need to use the opening and closing tags. Just add the code. :)
Title: Re: php on TP
Post by: dismal shadow on March 27, 2010, 03:40:42 PM
Interesting...it works.
Title: Re: php on TP
Post by: Xarcell on March 28, 2010, 05:50:35 AM
Bloc has added the opening and closing tags already, so it's not necessary to add them again. This helps prevent a few breaks in the admin part of the article if not coded properly.
Title: Re: php on TP
Post by: JPDeni on March 28, 2010, 06:37:35 PM
The reason that the opening and closing tags aren't used is that the php from blocks and articles is executed via an eval function (http://php.net/manual/en/function.eval.php).