13if (@(isset(
$_SERVER[
'REQUEST_URI']) && isset(
$_SERVER[
'REQUEST_METHOD']) && (
$_SERVER[
'REQUEST_METHOD'] ==
'GET' ||
$_SERVER[
'REQUEST_METHOD'] ==
'POST'))) {
19 'cpp' =>
'text/plain',
20 'c++' =>
'text/plain',
21 'dtd' =>
'text/plain',
23 'log' =>
'text/plain',
24 'rng' =>
'text/plain',
25 'txt' =>
'text/plain',
26 'xsd' =>
'text/plain',
34 'html' =>
'text/html',
35 'htmls' =>
'text/html',
36 'ico' =>
'image/x-ico',
37 'jpe' =>
'image/jpeg',
38 'jpg' =>
'image/jpeg',
39 'jpeg' =>
'image/jpeg',
40 'js' =>
'application/x-javascript',
41 'midi' =>
'audio/midi',
42 'mid' =>
'audio/midi',
44 'mov' =>
'movie/quicktime',
46 'mpg' =>
'video/mpeg',
47 'mpeg' =>
'video/mpeg',
48 'pdf' =>
'application/pdf',
50 'swf' =>
'application/shockwave-flash',
51 'tif' =>
'image/tiff',
52 'tiff' =>
'image/tiff',
58 header(
"Cache-Control: no-cache, must-revalidate");
59 header(
"Pragma: no-cache");
68 if (!$pt || $pt ==
'/') {
70 header(
'HTTP/1.1 301 Moved Permanently');
76 header(
'HTTP/1.0 404 Not Found');
77 echo
"<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File Not Found</h1>\n </body>\n</html>";
81 if (!isset($b[
'extension'])) {
82 header(
'Content-Type: text/plain');
87 if (isset($mimes[$b[
'extension']])) {
88 if ($mimes[$b[
'extension']] === 1) {
92 if ($mimes[$b[
'extension']] === 2) {
96 header(
'Content-Type: ' .$mimes[$b[
'extension']]);
113 static function go($return =
false)
122 if ($L[1] -
strlen($m) < 8192) {
123 $read = $L[1] -
strlen($m);
130 die(
'ERROR: manifest length read was "' .
131 strlen($m) .
'" should be "' .
140 die(
'Error: zlib extension is not enabled -' .
141 ' gzinflate() function needed for zlib-compressed .phars');
145 if ($f & self::BZ2) {
147 die(
'Error: bzip2 extension is not enabled -' .
148 ' bzdecompress() function needed for bz2-compressed .phars');
156 if (
strpos ($sessionpath,
";") !==
false)
157 $sessionpath =
substr ($sessionpath,
strpos ($sessionpath,
";")+1);
159 die(
'Could not locate temporary directory to extract phar');
161 $temp = $sessionpath;
164 $temp .=
'/pharextract/'.basename(__FILE__,
'.phar');
166 self::$origdir =
getcwd();
175 foreach ($info[
'm'] as $path =>
$file) {
180 if ($path[
strlen($path) - 1] ==
'/') {
207 if ($var =
getenv(
'TMPDIR')) {
218 $m =
substr($m, 14 + $l[1]);
224 for ($i = 0; $i < $info[1]; $i++) {
229 $savepath =
substr($m, $start, $len[1]);
235 $ret[
'm'][$savepath][3] =
sprintf(
'%u', $ret[
'm'][$savepath][3]
237 $ret[
'm'][$savepath][7] = $o;
238 $o += $ret[
'm'][$savepath][2];
239 $start += 24 + $ret[
'm'][$savepath][5];
240 $ret[
'c'] |= $ret[
'm'][$savepath][4] & self::MASK;
260 if ($entry[4] & self::GZ) {
262 }
elseif ($entry[4] & self::BZ2) {
267 die(
"Invalid internal .phar file (size error " .
strlen(
$data) .
" != " .
272 die(
"Invalid internal .phar file (checksum error)");
282 foreach (
glob(
'*') as $f) {
readfile(string $filename, bool $use_include_path=false, $context=null)
unlink(string $filename, $context=null)
getenv(?string $name=null, bool $local_only=false)
in_array(mixed $needle, array $haystack, bool $strict=false)
file_exists(string $filename)
array_values(array $array)
md5_file(string $filename, bool $binary=false)
strpos(string $haystack, string $needle, int $offset=0)
clearstatcache(bool $clear_realpath_cache=false, string $filename="")
is_writable(string $filename)
pathinfo(string $path, int $flags=PATHINFO_ALL)
fseek($stream, int $offset, int $whence=SEEK_SET)
file_put_contents(string $filename, mixed $data, int $flags=0, $context=null)
rmdir(string $directory, $context=null)
dirname(string $path, int $levels=1)
set_include_path(string $include_path)
chmod(string $filename, int $permissions)
unpack(string $format, string $string, int $offset=0)
header(string $header, bool $replace=true, int $response_code=0)
fopen(string $filename, string $mode, bool $use_include_path=false, $context=null)
glob(string $pattern, int $flags=0)
fread($stream, int $length)
mkdir(string $directory, int $permissions=0777, bool $recursive=false, $context=null)
basename(string $path, string $suffix="")
filesize(string $filename)
substr(string $string, int $offset, ?int $length=null)
bzdecompress(string $data, bool $use_less_memory=false)
static interceptFileFuncs()
static webPhar(?string $alias=null, ?string $index=null, ?string $fileNotFoundScript=null, array $mimeTypes=[], ?callable $rewrite=null)
const DIRECTORY_SEPARATOR
if(!extension_loaded('zip')) $fp
sprintf("0x%X", $numelems)
if(! $pass2) elseif( $pass2==1) elseif( $pass2==2)
session_save_path(?string $path=null)
if(!defined('PHPDBG_BOOTSTRAPPED')) $_SERVER
function_exists(string $function)
class_exists(string $class, bool $autoload=true)
die(string|int $status=0)
exit(string|int $status=0)
ZEND_API zend_result highlight_file(const char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini)
gzinflate(string $data, int $max_length=0)