Forum
How can I enter PHP in a "code block"?
Is there any way to allow the manual addition of PHP into a "code block" region? Currently it's just commented out in the code.
Thanks!
Is there any way to allow the manual addition of PHP into a "code block" region? Currently it's just commented out in the code.
Thanks!
You can't enter PHP anywhere via the control panel.
I'd really like to be able to include some PHP in some pages but not others, but it would be different each time.
Thanks.
Hello James,
Besides the fact that you can't, your PHP code is best placed in your codebase, not your database. You generally would want to be able to maintain and version control your code.
Is there any reason why you can't do that directly on your PHP files?
If you can explain what you are ultimately trying to achieve, we may be able to help you come up with a more suitable solution.
You can still do stuff in PHP and inject it into the templates, you just can't key PHP into a content field.
No problem, thanks for the replies. I know what I want to do is a bit hacky, would just be super convenient ;)
Thanks again guys.