HEX
Server: Apache/2
System: Linux cloudserver.ecpvn.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: monspa (1053)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/monspa/public_html/wp-content/plugins/really-simple-ssl/lib/admin/class-helper.php
<?php
namespace RSSSL\lib\admin;

/**
 * Trait admin helper
 *
 *
 * @package RSSSL\helper
 * @since   8.2
 *
 * @author  Really Simple Security
 * @see     https://really-simple-ssl.com
 */
trait Helper {
	/**
	 * Get the wp-config path
	 *
	 * @return string
	 */
	public function wpconfig_path(): string {
		$location_of_wp_config = ABSPATH;
		if ( ! file_exists( ABSPATH . 'wp-config.php' ) && file_exists( dirname( ABSPATH ) . '/wp-config.php' ) ) {
			$location_of_wp_config = dirname( ABSPATH );
		}
		$location_of_wp_config = trailingslashit( $location_of_wp_config );
		$wpconfig_path         = $location_of_wp_config . 'wp-config.php';
		if ( file_exists( $wpconfig_path ) ) {
			return $wpconfig_path;
		}
		return '';
	}

	/**
	 * Log a message if WP_DEBUG is enabled
	 *
	 * @param string $message
	 *
	 * @return void
	 */
	public function log( string $message ): void {
		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
			error_log( "Really Simple Security: ".$message );
		}
	}

}