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

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
User avatar
master412160
Registered User
Posts: 314
Joined: Sat May 22, 2010 5:45 pm
Location: Belgium, Flanders
Name: Max Pen
Contact:

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

Post by master412160 » Sun May 03, 2015 10:38 pm

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?

User avatar
david63
Registered User
Posts: 16711
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » Sun May 03, 2015 11:12 pm

If PHP was not enabled then you would not be able to reach the ACP
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
master412160
Registered User
Posts: 314
Joined: Sat May 22, 2010 5:45 pm
Location: Belgium, Flanders
Name: Max Pen
Contact:

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

Post by master412160 » Sun May 03, 2015 11:28 pm

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.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50893
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

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

Post by stevemaury » Mon May 04, 2015 12:56 am

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.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
Lumpy Burgertushie
Registered User
Posts: 66849
Joined: Mon May 02, 2005 3:11 am
Contact:

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

Post by Lumpy Burgertushie » Mon May 04, 2015 1:00 am

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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Locked

Return to “[3.1.x] Support Forum”