Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php AmazonS3如果对象存在方法问题_Php_Amazon S3 - Fatal编程技术网

Php AmazonS3如果对象存在方法问题

Php AmazonS3如果对象存在方法问题,php,amazon-s3,Php,Amazon S3,我正在使用亚马逊,我需要检查wither an与否 但是当在firefox中使用S3浏览器时,指定的对象存在 $response = $s3->if_object_exists($bucket, '/albums/Carcassonne-France/1.jpg'); var_dump($response); //RESPONSE TRUE 但是这是正确的,因为我在上面的位置有1.jpg,但是我想检查下面指定的路径是否存在 $response = $s3->if_object_ex

我正在使用亚马逊,我需要检查wither an与否

但是当在firefox中使用S3浏览器时,指定的对象存在

$response = $s3->if_object_exists($bucket, '/albums/Carcassonne-France/1.jpg');
var_dump($response); //RESPONSE TRUE
但是这是正确的,因为我在上面的位置有1.jpg,但是我想检查下面指定的路径是否存在

$response = $s3->if_object_exists($bucket, '/albums/Carcassonne-France/');

如何检查单独的路径是否存在?

S3是一个平面文件系统。没有文件夹。只有带斜杠的文件名。一些S3浏览工具选择在软件中显示“文件夹”的概念,但它们只是假装而已

“/albums/Carcasonne France/”返回false,因为没有具有该名称的单数对象

$response = $s3->if_object_exists($bucket, '/albums/Carcassonne-France/');