當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Phar::mungServer方法代碼示例

本文整理匯總了PHP中Phar::mungServer方法的典型用法代碼示例。如果您正苦於以下問題:PHP Phar::mungServer方法的具體用法?PHP Phar::mungServer怎麽用?PHP Phar::mungServer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phar的用法示例。


在下文中一共展示了Phar::mungServer方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

<?php

Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
Phar::webPhar();
echo "oops did not run\n";
var_dump($_ENV, $_SERVER);
__halt_compiler(); ?>
7	index.php;¯ÆkJ;WËR¶<?php
var_dump($_SERVER["PHP_SELF"]);
var_dump($_SERVER[b"SCRIPT_NAME"]);
var_dump($_SERVER[b"SCRIPT_FILENAME"]);
var_dump($_SERVER[b"REQUEST_URI"]);
var_dump($_SERVER[b"PHAR_PHP_SELF"]);
var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]);
var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]);
var_dump($_SERVER[b"PHAR_REQUEST_URI"]);
cìäj�Fgsð_qúšGBMB
開發者ID:gleamingthecube,項目名稱:php,代碼行數:17,代碼來源:ext_phar_tests_cache_list_frontcontroller21.php

示例2:

<?php

Phar::mungServer(array(array(), "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
Phar::webPhar();
echo "oops did not run\n";
var_dump($_ENV, $_SERVER);
__halt_compiler(); ?>
7	index.php4╠УG4?▐кТ╤<?php
var_dump($_SERVER["PHP_SELF"]);
var_dump($_SERVER["SCRIPT_NAME"]);
var_dump($_SERVER["SCRIPT_FILENAME"]);
var_dump($_SERVER["REQUEST_URI"]);
var_dump($_SERVER["PHAR_PHP_SELF"]);
var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
var_dump($_SERVER["PHAR_REQUEST_URI"]);
ънюёs╥▄вр	└вI4╙&╓ZGBMB
開發者ID:gleamingthecube,項目名稱:php,代碼行數:17,代碼來源:ext_phar_tests_cache_list_frontcontroller20.php

示例3: array

<?php

Phar::mungServer(array());
Phar::webPhar("whatever", "index.php", null, array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
echo "oops did not run\n";
var_dump($_ENV, $_SERVER);
__halt_compiler(); ?>
�a.phps��H
�k+�a.jpg��H��b��a.php��Hl�`�fronk.gronk��H!�eŶhio1hio2<?php function hio(){}hio3:�\鿯��/�F�<����GBMB
開發者ID:zaky-92,項目名稱:php-1,代碼行數:9,代碼來源:ext_phar_tests_cache_list_frontcontroller18.php

示例4: ini_set

<?php

ini_set('phar.readonly', 1);
function print_exception($e)
{
    echo "\nException: " . $e->getMessage() . " in " . $e->getFile() . " on line " . $e->getLine() . "\n";
}
Phar::mungServer('hi');
Phar::createDefaultStub(array());
Phar::loadPhar(array());
Phar::canCompress('hi');
try {
    $a = new Phar(array());
} catch (TypeError $e) {
    print_exception($e);
}
try {
    $a = new Phar(dirname(__FILE__) . '/files/frontcontroller10.phar');
} catch (PharException $e) {
    print_exception($e);
}
$a->convertToExecutable(array());
$a->convertToData(array());
try {
    $b = new PharData(dirname(__FILE__) . '/whatever.tar');
} catch (PharException $e) {
    print_exception($e);
}
try {
    $c = new PharData(dirname(__FILE__) . '/whatever.zip');
} catch (PharException $e) {
開發者ID:zaky-92,項目名稱:php-1,代碼行數:31,代碼來源:ext_phar_tests_badparameters.php

示例5: s

<?php

function s($a)
{
    return "/html/index.php";
}
Phar::interceptFileFuncs();
Phar::mungServer(array("PHP_SELF", "REQUEST_URI"));
Phar::webPhar("whatever", "/html/index.php", null, array(), "s");
echo "oops did not run\n";
var_dump($_ENV, $_SERVER);
__halt_compiler(); ?>
<html/index.phpP�kJP>�P�<?php
var_dump($_SERVER[b"PATH_INFO"]);
var_dump($_SERVER[b"PATH_TRANSLATED"]);
�ў�5ȏ�nh�1��>�GBMB
開發者ID:gleamingthecube,項目名稱:php,代碼行數:16,代碼來源:ext_phar_tests_frontcontroller23.php


注:本文中的Phar::mungServer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。