本文整理汇总了PHP中tar::extractToS3方法的典型用法代码示例。如果您正苦于以下问题:PHP tar::extractToS3方法的具体用法?PHP tar::extractToS3怎么用?PHP tar::extractToS3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tar
的用法示例。
在下文中一共展示了tar::extractToS3方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rtrim
case "importqimages":
if ($myrights < 100 || !$allowmacroinstall) {
echo "You don't have the authority for this action";
break;
}
$uploaddir = rtrim(dirname(__FILE__), '/\\') . '/import/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
if (strpos($uploadfile, '.tar.gz') !== FALSE) {
include "../includes/tar.class.php";
include "../includes/filehandler.php";
$tar = new tar();
$tar->openTAR($uploadfile);
if ($tar->hasFiles()) {
if ($GLOBALS['filehandertypecfiles'] == 's3') {
$n = $tar->extractToS3("qimages", "public");
} else {
$n = $tar->extractToDir("../assessment/qimages/");
}
require "../header.php";
echo "<p>Extracted {$n} files. <a href=\"admin.php\">Continue</a></p>\n";
require "../footer.php";
exit;
} else {
require "../header.php";
echo "<p>File appears to contain nothing</p>\n";
require "../footer.php";
exit;
}
}
unlink($uploadfile);