Jump to content

php blank page


jhrhp

Recommended Posts

By default, WHMCS locks the {php} tag from template usage, and this is the expected behavior.

 

I wouldn't get too used to using it, as it's highly frowned upon, however if you go to admin -> setup -> general settings -> security, you can enable this feature.

 

Again, don't get too used to using it, I wouldn't be terribly surprised if that got yanked out in v7.

 

using {php} in smarty has been frowned upon for quite some time, it was disabled by default in smarty3, and , again, I wouldn't be totally surprised if it was removed entirely in future versions of smarty.

Link to comment
Share on other sites

you need to enable support of {php} tag from Admin Area -> Setup -> General Settings -> Security Tab -> *Allow Smarty PHP Tags*

 

but it is recommended to write your PHP logic in ActionHook function and pass the results to Smarty, this is better and safe

 

An option was added to WHMCS 6 to enable use of the potentially dangerous {php} tag in custom templates. This option is disabled by default but can be enabled if required in Setup > General Settings > Security. We strongly encourage using hook functions over php code blocks inside of templates for backend interaction.
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