Skip to content

Instantly share code, notes, and snippets.

@shabbirbhimani

shabbirbhimani/config.php

Last active Nov 3, 2018
Embed
What would you like to do?
How to Enable Debug Mode in XenForo Only for Admins
<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
// Add here your ip.
$debug_ips = array('202.71.5.115');
//For multiple IPs Use this
//$debug_ips = array('202.71.5.115','SOME.OTHER.IP');
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip_address = $_SERVER['REMOTE_ADDR'];
}
if(in_array($ip_address, $debug_ips))
$config['debug'] = true;
@4maroc

This comment has been minimized.

Copy link

@4maroc 4maroc commented Mar 10, 2018

Sorry but Not working
i use xenforo 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment