Jump to content

How do I display PHP code in a KB article?


Nullified

Recommended Posts

I am trying my hardest to display simple php code in my knowledge articles, but WHMCS keeps html commenting the code. I just want <?php phpinfo(); ?> to show in my article. I have tried all these:

<div><?php phpinfo(); ?></div>
<code><?php phpinfo(); ?></code>
<div><code><?php phpinfo(); ?></code></div>
<blockquote><code><?php phpinfo(); ?></code></blockquote>
<blockquote><?php phpinfo(); ?></blockquote>
<div><?php phpinfo(); ?></div>
<code><?php phpinfo(); ?></code>
<div><code><?php phpinfo(); ?></code></div>
<blockquote><code><?php phpinfo(); ?></code></blockquote>
<blockquote><?php phpinfo(); ?></blockquote>

Link to comment
Share on other sites

What the hell is wrong with my WHMCS? It changes even that to <pre><!--?php phpinfo(); ?--></pre>

 

you must use <pre> <?php phpinfo(); ?> </pre>

 

if you use <pre><?php phpinfo(); ?></pre> it will automatic convert to <pre><!--?php phpinfo(); ?--></pre>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated