我无法使用浏览器在 sdk 2.* 上执行此代码;
<?php
header('Content-type: text/plain; charset = utf-8');
require 'aws-autoloader.php';
use Aws\S3\S3Client;
require 's3_config.php'; // credentials vs.
$time_start = microtime(true);
#----------------------------------------------------#
$bucket = time()."unique_bucket_id";
echo "Creating bucket named {$bucket}\n";
$result = $client->createBucket(array(
'Bucket' => $bucket
));
// Wait until the bucket is created
$client->waitUntilBucketExists(array('Bucket' => $bucket));
echo "Created {$bucket}\n";
#-------------------------------------------------------#
$time = microtime(true)-$time_start;
echo PHP_EOL.PHP_EOL.$time.PHP_EOL;
但它在终端中清晰地工作。使用浏览器应该怎么做?(当我根据php sdk 1.6.2更改代码时,它可以同时在终端和浏览器上工作。我的意思是没有权限问题。)