HEX
Server: nginx/1.28.1
System: Linux iZgw8b5bpgd4jyptfmmmxgZ 6.6.102-5.2.alnx4.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 27 23:11:10 CST 2025 x86_64
User: www (1000)
PHP: 8.2.28
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.scdc-marine.com/wp-content/plugins/Static-Html-Output/plugin/WP2Static/WPSite.php
<?php

class WPSite {
    public function __construct() {
        $wp_upload_path_and_url = wp_upload_dir();
        $this->uploads_url = $wp_upload_path_and_url[ 'baseurl' ];
        $this->site_url = get_home_url() . '/';
        $this->parent_theme_url = get_template_directory_uri();
        $this->wp_content_url = content_url();
        $this->site_path = ABSPATH;
        $this->plugins_path = $this->getWPDirFullPath( 'plugins' );
        $this->wp_uploads_path = $this->getWPDirFullPath( 'uploads' );
        $this->wp_includes_path = $this->getWPDirFullPath( 'wp-includes' );
        $this->wp_content_path = $this->getWPDirFullPath( 'wp-content' );
        $this->theme_root_path = $this->getWPDirFullPath( 'theme-root' );
        $this->parent_theme_path = $this->getWPDirFullPath( 'parent-theme' );
        $this->child_theme_path = $this->getWPDirFullPath( 'child-theme' );
        $this->child_theme_active = $this->parent_theme_path !== $this->child_theme_path;
        $this->permalink_structure = get_option( 'permalink_structure' );
        $this->wp_inc = '/' . WPINC;
        $this->wp_content = WP_CONTENT_DIR;
        $this->wp_uploads = str_replace( ABSPATH, '/', $this->wp_uploads_path );
        $this->wp_plugins = str_replace( ABSPATH, '/', WP_PLUGIN_DIR );
        $this->wp_themes = str_replace( ABSPATH, '/', get_theme_root() );
        $this->wp_active_theme = str_replace( home_url(), '', get_template_directory_uri() );
        $this->detect_base_url();
        $this->subdirectory = $this->isSiteInstalledInSubDirectory();
        $this->wp_site_subdir = $this->subdirectory;
        $this->wp_site_url = $this->site_url;
        $this->wp_site_path = $this->site_path;
        $this->wp_uploads_url = $this->uploads_url;
        $this->uploads_writable = $this->uploadsPathIsWritable();
        $this->permalinks_set = $this->permalinksAreDefined();
        $this->curl_enabled = $this->hasCurlSupport();
    }

    public function isSiteInstalledInSubDirectory() {
        $parsed_site_url = parse_url( rtrim( $this->site_url, '/' ) );
        if ( isset( $parsed_site_url[ 'path' ] ) ) {
            return $parsed_site_url[ 'path' ];
        }
        return false;
    }

    public function uploadsPathIsWritable() {
        return $this->wp_uploads_path && is_writable( $this->wp_uploads_path );
    }

    public function hasCurlSupport() {
        return extension_loaded( 'curl' );
    }

    public function permalinksAreDefined() {
        return strlen( get_option( 'permalink_structure' ) );
    }

    public function detect_base_url() {
        $site_url = get_option( 'siteurl' );
        $home = get_option( 'home' );
    }

    public function getWPDirFullPath( $wp_dir ) {
        $full_path = '';
        switch ( $wp_dir ) {
            case 'wp-content': $full_path = WP_CONTENT_DIR;
            break;
            case 'uploads': $upload_dir_info = wp_upload_dir();
            $full_path = $upload_dir_info[ 'basedir' ];
            break;
            case 'wp-includes': $full_path = ABSPATH . WPINC;
            break;
            case 'plugins': $full_path = WP_PLUGIN_DIR;
            break;
            case 'theme-root': $full_path = get_theme_root();
            break;
            case 'parent-theme': $full_path = get_template_directory();
            break;
            case 'child-theme': $full_path = get_stylesheet_directory();
            break;
        }
        return rtrim( $full_path, '/' );
    }

    public function getWPDirNameOnly( $wp_dir ) {
        $wp_dir_name = '';
        switch ( $wp_dir ) {
            case 'child-theme': case 'parent-theme': case 'wp-content': case 'wp-includes': case 'uploads': case 'theme-root': case 'plugins': $wp_dir_name = $this->getLastPathSegment( $this->getWPDirFullPath( $wp_dir ) );
            break;
        }
        return rtrim( $wp_dir_name, '/' );
    }

    public function getLastPathSegment( $path ) {
        $path_segments = explode( '/', $path );
        return end( $path_segments );
    }

    public function getWPContentSubDirectory() {
        $parsed_url = parse_url( $this->parent_theme_url );
        $path_segments = explode( '/', $parsed_url[ 'path' ] );
        if ( count( $path_segments ) === 5 ) {
            return $path_segments[ 1 ] . '/';
        } else {
            return '';
        }
    }
}