is there a way to have some php in an entry?
or am I stuck importing an iframe?
thanks
-bb
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 08, 2012 7:47pm
Subscribe [3]#1 / Mar 08, 2012 7:47pm
is there a way to have some php in an entry?
or am I stuck importing an iframe?
thanks
-bb
#2 / Mar 09, 2012 11:02am
blackberg,
Go to the template manager and select the template you want to use the PHP in and turn php on within the template preferences.
#3 / Mar 09, 2012 12:54pm
I have done that, but text imputed into the entry tab using a PHP enabled template, will type out the text and not proccess the php
-bb
#4 / Mar 09, 2012 12:59pm
You will need to describe what you are trying to do in more detail. Also posting some example code of what you are doing will help.
#5 / Mar 09, 2012 1:08pm
Hello blackberg,
Thank you for posting your question.
Make sure that you have output or input selected as needed.
Having a peek at your code would be helpful.
Cheers,
#6 / Mar 09, 2012 2:46pm
I have a web page using a template, the template has php enabled
in the entry that the page uses, the body field, I want to type some php code in that will display on the webpage.
if I type
<?php echo 'Hello World'; ?>in the entry field,
it will display this in the source code of the page when it loads
<?php echo ‘
Hello World
‘; ?> If use the php in the template itself it works, but this is a one off thing, that may be used in the future but not now, but I will have to create a new template and channel to use the way we need to use it. Something completely different came up the other day, and that would required a completely different template and completely different channel to get it to work, I handled that one in an iframe, and it was fine for that.
If I can get the “hello world” to work, then my code should work
I already tried changing the output and input
changing the none/xhtml/< br/ >
and it wont work
-bb
#7 / Mar 09, 2012 2:50pm
For security reasons PHP will never work inside content fields. I misunderstood your first post.
#8 / Mar 09, 2012 8:05pm
Hi blackberg,
VIM Interactive is correct. This is a security precaution. Is there anything else I can assist you with?
Sean