App and Website Settings
';
$settings = array();
foreach ($_SERVER as $key => $value) {
if ((strpos($key, "APPSETTING_") !== 0) && (strpos($key, "WEBSITE_") !== 0)) {
continue;
}
$settings[$key] = $value;
}
ksort($settings);
foreach ($settings as $key => $value){
//if (defined($value))
echo $key.': ' .$value.'
';
}
echo "";
}
public function getDefines(){
echo 'WP Defines
';
$configArray = array('WP_DEBUG','WP_DEBUG_LOG','WP_DEBUG_DISPLAY','DB_HOST','DB_NAME','WPCACHEHOME','WP_HOME','WP_SITEURL','WP_CONTENT_URL','DOMAIN_CURRENT_SITE');
foreach ($configArray as $key => $value){
if (defined($value))
echo $value.': ' .constant($value).'
';
}
echo '';
}
public function getPlugins(){
$plugindir = get_plugins();
$active = array();
$inactive = array();
foreach($plugindir as $key => $value){
is_plugin_active($key)?$active[]=$key:$inactive[]=$key;
}
echo 'List of plugins in WP
Active:
';
foreach($active as $key => $value){
echo "- $value
";
}
echo "
Inactive:
";
foreach($inactive as $key => $value){
echo "- $value
";
}
echo '
';
}
public function getTheme(){
echo 'Current WP Theme
';
echo "Theme Name: ". wp_get_theme().'
Theme Path: '.get_template_directory();
echo '
';
}
public function getUserini(){
echo '.user.ini Contents
';
$file = get_home_path().'.user.ini';
if (file_exists($file))
echo readfile($file);
else
echo "No .user.ini found at path: ".$file;
echo '
';
}
public function getPHPErrorsLog(){
echo 'php_errors.log Contents
';
$file = ini_get('error_log');
if (file_exists($file)){
echo azasa_mytail($file);
}
else{
echo "No php_errors.log found at path: ".$file;
}
echo ' ';
}
public function getDebugLog(){
$file = content_url('debug.log');
echo 'debug.log Contents
';
if (file_exists($file)){
echo azasa_mytail($file);
}
else{
echo "No debug.log found at path: ".$file;
}
echo ' ';
}
public function DownloadAZASALog()
{
$file = dirname(ini_get('error_log'))."\\".$this->logFile;
?>
/*
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
readfile($file);
}
else
{
echo "hi!";
}
*/
}
}