Server IP : 104.21.14.103 / Your IP : 3.144.86.105 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/thread-self/root/proc/thread-self/root/home/giankuin/sieuthiweb.com.vn/dup-installer/classes/ |
Upload File : |
<?php /** * Class used to update and edit web server configuration files * for .htaccess, web.config and user.ini * * Standard: PSR-2 * @link http://www.php-fig.org/psr/psr-2 Full Documentation * * @package SC\DUPX\Crypt * */ defined('ABSPATH') || defined('DUPXABSPATH') || exit; /** * Package related functions * */ final class DUPX_Package { /** * * @staticvar bool|string $packageHash * @return bool|string false if fail */ public static function getPackageHash() { static $packageHash = null; if (is_null($packageHash)) { if (($packageHash = DUPX_Boot::getPackageHash()) === false) { throw new Exception('PACKAGE ERROR: can\'t find package hash'); } } return $packageHash; } /** * * @staticvar string $archivePath * @return bool|string false if fail */ public static function getPackageArchivePath() { static $archivePath = null; if (is_null($archivePath)) { $path = DUPX_INIT.'/'.DUPX_Boot::ARCHIVE_PREFIX.self::getPackageHash().DUPX_Boot::ARCHIVE_EXTENSION; if (!file_exists($path)) { throw new Exception('PACKAGE ERROR: can\'t read package path: '.$path); } else { $archivePath = $path; } } return $archivePath; } /** * * @return string */ public static function getWpconfigArkPath() { return DUPX_Paramas_Manager::getInstance()->getValue(DUPX_Paramas_Manager::PARAM_PATH_NEW).'/dup-wp-config-arc__'.self::getPackageHash().'.txt'; } /** * * @staticvar type $path * @return string */ public static function getWpconfigSamplePath() { static $path = null; if (is_null($path)) { $path = DUPX_INIT.'/assets/wp-config-sample.php'; } return $path; } /** * * @staticvar string $path * @return string */ public static function getSqlFilePath() { static $path = null; if (is_null($path)) { $path = DUPX_INIT.'/dup-database__'.self::getPackageHash().'.sql'; } return $path; } /** * * @return int */ public static function getSqlFileSize() { return (is_readable(self::getSqlFilePath())) ? (int) filesize(self::getSqlFilePath()) : 0; } /** * Get htaccess archive file path * * @return string the .htaccess file's path */ public static function getHtaccessArkPath() { return DUPX_Paramas_Manager::getInstance()->getValue(DUPX_Paramas_Manager::PARAM_PATH_NEW).'/.htaccess__'.$GLOBALS['DUPX_AC']->package_hash; } }