Page 1 of 1

is there an IF php statement that checks if php is enabled in acp?

Posted: Sun May 03, 2015 10:38 pm
by master412160
I want to run some php code and only make it output when in the ACP in security settings php loading is enabled.

So is there a way to put in code in a IF statement that checks if it is enabled or not?

Re: is there an IF php statement that checks if php is enabled in acp?

Posted: Sun May 03, 2015 11:12 pm
by david63
If PHP was not enabled then you would not be able to reach the ACP

Re: is there an IF php statement that checks if php is enabled in acp?

Posted: Sun May 03, 2015 11:28 pm
by master412160
david63 wrote:If PHP was not enabled then you would not be able to reach the ACP
But <!-- IF PHP_IS_ENABLED -->php code here <!-- ENDIF --> is not php is it? That is what I need. An IF statement.

Re: is there an IF php statement that checks if php is enabled in acp?

Posted: Mon May 04, 2015 12:56 am
by stevemaury
This makes no sense.

<!-- IF PHP_IS_ENABLED -->php code here <!-- ENDIF --> is the same as "php code here". No IF needed. If it is enabled, the code will run and if not it won't.

Re: is there an IF php statement that checks if php is enabled in acp?

Posted: Mon May 04, 2015 1:00 am
by Lumpy Burgertushie
as long as you don't make any mistakes with how you add your php to your template files, then as steve said, there is no need for an IF statement about it. put your php that you want to work when php is enabled and it will work when php is enabled.

by the way, there is only two choices for this option. it is either always on or always off for the whole board and it is strictly a setting that only admins can turn on and only those with access to the actual files will be able to use.

robert