Keyword

[SOLVED] Diplaying php code inside of an item

  • VPSLounge
  • VPSLounge's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113718 by VPSLounge
Hi,

Trying to display some simple php code inside of an item. Just want to display it, not run it.

The problem is that the code is actually being executed when loading the page.

Have tried <pre>, and <code> tags. Neither seem to stop it. Also have tried a few code display plugins, which only seem to give more options for displaying it, like highlighting.

An example is I wanted to create an article with some basic PHP configuration settings. Creating a info.php file is part of the article. So need to display the code so the reader can easily copy and paste it. But in this situation, it actually executes the info.php code.

Any ideas?

Joomla 2.6 and the latest K2 are the versions I have.

Thanks.

Please Log in or Create an account to join the conversation.

  • VPSLounge
  • VPSLounge's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113719 by VPSLounge
Replied by VPSLounge on topic Re: Diplaying php code inside of an item
Figured it out. The brackets need to be escaped correctly. And it is working with <pre>

Thanks.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum