本文整理汇总了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
示例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
示例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
示例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) {
示例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