Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-04 01:13:27

ikebowen
Archived Plugin Author
Registered: 2005-12-24
Posts: 48
Website

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

#2 2006-01-04 01:18:30

ikebowen
Archived Plugin Author
Registered: 2005-12-24
Posts: 48
Website

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

Re: 4.0.2: Problem with <txp:php>

I’m trying to run PHP code in an article

See the FAQ.


Alex

Offline

#4 2006-01-04 02:33:10

ikebowen
Archived Plugin Author
Registered: 2005-12-24
Posts: 48
Website

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

Board footer

Powered by FluxBB