Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
4.0.2: Problem with <txp:php>
I’m fairly sure that this is just a problem with eval(), but vatevah. I’m trying to run PHP code in an article containing an if statement with multiple conditions. It breaks, under every test I’ve run, oddly enough. The code follows:
<code>
<txp:php>
$foo = true;
if ( $foo && $foo ) {
echo( ‘test’ );
}
</txp:php>
</code>
PHP’s returning the following error:
<code>
Parse error: parse error, unexpected T_ECHO in /home/ike/public_html/textpattern/publish/taghandlers.php(1666) : eval()’d code on line 5
</code>
Any ideas?
Update: I tested eval()’ing that code in an external script, and it worked, actually. And it looks TXP has some minor troubles rendering <txp:php> content inside of a <code> block.
Last edited by ikebowen (2006-01-04 01:15:23)
Offline
Re: 4.0.2: Problem with <txp:php>
Wierd… Now I can’t edit the above post. [ frowns ]
Offline
#3 2006-01-04 01:28:40
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline
Re: 4.0.2: Problem with <txp:php>
Ah. I’ll try that then, shall I? Apologies for not checking there first…
This was what I wanted it for, btw.
Feel free to delete this thread.
Last edited by ikebowen (2006-01-04 02:52:41)
Offline
Pages: 1