3

Is it possible to add PHP code to drupal content(eg. Basic page)? I have enabled Context & Context PHP Module. Can any one please tell me if it is possible Thanks

2 Answers 2

4

Yes, it's possible. You should enable "PHP filter" module (it's a core module so it's already installed and available on your module list admin/modules) and then choose "PHP code" as your text format while creating a new node (php code in your node also should be surrounded by <?php ?> tags to be executed).

Sign up to request clarification or add additional context in comments.

Comments

2

It should be noted that enabling PHP in a Drupal (or any other) environment has huge security implications. PHP-enabled environments are very powerful and can have catastrophic consequences when used maliciously or even erroneously. Only enable PHP if you know what you're doing and why you're doing it. It's turned off by default for a reason.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.