Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
php in articles
hey
I am trying to write some php functions for txp. I want to control these functions via cms meaning that each script is included in an article but I am having trouble getting this to work.
I made 2 articles. First includes: <txp:php>phpinfo();</txp:php> which works fine.
Second article contains <txp:php>echo(“foobar”);</txp:php> which returns the following error:
Parse error: syntax error, unexpected ‘&’ in /textpattern/publish/taghandlers.php(2811) : eval()’d code on line 1
why wouldn’t this script work? I copied the script into one of the pages and it works. It just doesn’t seem to work within the article… I turned the use of php in articles an pages on!
please help :)
I sometimes destructively reverse engineer my own work and the only help is this forum.
visit me at visiongraphix
Offline
Re: php in articles
ahhhhh … i turned off textile … working now … the only problem left ist that the output of the php script is not positioned within the articles content but way below????
Last edited by markusfalk (2008-04-13 15:11:15)
I sometimes destructively reverse engineer my own work and the only help is this forum.
visit me at visiongraphix
Offline
Re: php in articles
With textile turned on did you try notextile. <txp:php>echo("foobar");</txp:php>
?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: php in articles
It’s working now. I turned off textile for the body and only include the php-files from outer txp. It worked with the content within the right position – seems this was only some sort of cache problem
thanks everyone :)
I sometimes destructively reverse engineer my own work and the only help is this forum.
visit me at visiongraphix
Offline
Pages: 1