Server IP : 172.67.158.161 / Your IP : 18.119.111.12 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/home/giankuin/sieuthiweb.com.vn/dup-installer/lib/dup_archive/classes/headers/ |
Upload File : |
<?php if (!defined("ABSPATH") && !defined("DUPXABSPATH")) die(""); /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ if(!class_exists('DupArchiveHeaderU')) { class DupArchiveHeaderU { const MaxStandardHeaderFieldLength = 128; public static function readStandardHeaderField($archiveHandle, $ename) { $expectedStart = '<'.$ename.'>'; $expectedEnd = '</'.$ename.'>'; $startingElement = fread($archiveHandle, strlen($expectedStart)); if($startingElement !== $expectedStart) { throw new Exception("Invalid starting element. Was expecting {$expectedStart} but got {$startingElement}"); } //return DupProSnapLibStreamU::streamGetLine($archiveHandle, self::MaxStandardHeaderFieldLength, $expectedEnd); $headerString = stream_get_line($archiveHandle, self::MaxStandardHeaderFieldLength, $expectedEnd); if ($headerString === false) { throw new Exception('Error reading line.'); } return $headerString; } } }