By pdjohnson on
Hi,
I have set the input format for my node to php for the field in question but the php is just displaying as viewable code rather than executing. Is there are setting somewhere else in 4.7.x or am I missing something fundamental?
I have tried this in a page and a block but no luck.
Any help greatly appreciated
Paul
Comments
Did you put in the PHP tags
Did you put in the PHP tags around your code:
<?php ?>---
Work: BioRAFT
php tags
Yes,
I think I have done it all right ;-(
PJ
--Paul Johnson
Do you have the codefilter
Do you have the codefilter module installed?
---
Work: BioRAFT
Code Filter
I do not have the code filter installed, should I?
--Paul Johnson
No- this is the filter used,
No- this is the filter used, for example, on drupal.org so that code is escaped and syntax colored.
---
Work: BioRAFT
Also need to set input format
Also need to set input format to 'PHP code'
Cracked it
I turned off FCKeditor and the php works. I guess there is a fillter or code rewrite going on which is spoiling things. Thanks for all the suggestions.
--Paul Johnson
Aye, you can't use a rich
Aye, you can't use a rich text editor (like FCK) because it automatically turns your < and > signs into their HTML character strings... < and >. Hence the code never getting parsed... it wasn't really enclosed by the right tags. ; )
----------------------
Current Drupal project: http://www.ubercart.org