allow_php_in_templates
|
Posted
#77265
(In Topic #15898)
|
|
|---|---|
|
Fan in training |
So I tried to add a PHP code in the header, and I got this message: The hidden allow_php_in_templates option is not turned on, so PHP code in templates will not run. The option is described in the ocPortal Code Book, available from ocportal.com. The standard practice for your use case is to create and reference a miniblock, as it separates concerns well, promotes re-usability, and provides a security barrier. How do I enabled allow_php_in_templates? And how do I create a miniblock? I do not have any experience with PHP and stuff, all I wanted to do is to do add a Php include. Hope to hear from you soon! Jason |
|
Posted
|
|
|
Community saint |
So to enabled allow_php_in_templates you would type: Code
:set_value('allow_php_in_templates','1')
Note that it is not recommended to enable allow_php_in_templates as it is a security risk as described in the Code Book as follows: As for miniblocks, see Creating Miniblocks from Third-Party Code - ocPortal
Visit Last Gamer because its made with ocPortal.
Stay for the content - Video game retrospectives, reviews, galleries and discussions. Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio . |
1 guests and 0 members have just viewed this: None
Control functions:






