Azure存储图像上载无法正常工作

我遇到Azure存储问题,我不能100%确定如何修复它。 我需要能够拍摄图像并将其上传到容器中。 这是我第一次使用Azure存储。 以下是一些代码:</ p>

  require_once'proforts \ autoload.php'; 
require_once'WindowsAzure \ WindowsAzure.php';
use WindowsAzure \ Common \ ServicesBuilder;
$ connectionString ='DefaultEndpointsProtocol = http; AccountName = buyeraudit; AccountKey = MYKEY';
$ blobRestProxy = ServicesBuilder :: getInstance() - &gt; createBlobService($ connectionString);
</ code> </ pre>
\ n

这是另一部分:</ p>

  $ newFileName = $ pro [0] ['proid']。'。'。  $ picExt; 
rename($ _ FILES ['pic'] ['tmp_name'],$ newFileName);
$ blobRestProxy-&gt; createBlockBlob(“images”,$ newFileName,file_get_contents($ _ FILES ['pic'] [' name']));
</ code> </ pre>

我只是设置了sdk,所以它也可能是一个与之有关的问题。 感谢所有帮助,感谢您的帮助。</ p>
</ div>

展开原文

原文

I have an issue with Azure Storage and I am not 100% sure how to fix it. I need to be able to take an image and upload it to a container. This is my first time using Azure Storage. Here is some of the code:

require_once 'vendor\autoload.php';
require_once 'WindowsAzure\WindowsAzure.php';
use WindowsAzure\Common\ServicesBuilder;
$connectionString = 'DefaultEndpointsProtocol=http;AccountName=buyeraudit;AccountKey=MYKEY';
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);

here is another part:

$newFileName = $pro[0]['proid'] .'.'. $picExt;
rename($_FILES['pic']['tmp_name'], $newFileName);
$blobRestProxy->createBlockBlob("images", $newFileName,  file_get_contents($_FILES['pic']['name']));

I just set the sdk up so it may also be an issue that has to do with that. I appreciate all help and thank you for helping.

douba8819
douba8819 我的错误:警告:require_once(vendor\autoload.php):无法打开流:第5行/opt/bitnami/apache2/htdocs/submitted-product.php中没有此类文件或目录致命错误:require_once():失败在/opt/bitnami/apache2/htdocs/submitted-中打开所需的“vendor\autoload.php”(include_path='。:/opt/bitnami/php/lib/php:/opt/bitnami/frameworks/smarty/libs')product.php在第5行
5 年多之前 回复
dongxu3029
dongxu3029 最后:你得到了什么错误?
5 年多之前 回复
duandi8613
duandi8613 另外:将来,请保持联系!
5 年多之前 回复
duanqing2209
duanqing2209 请参阅:azure.microsoft.com/en-us/documentation/articles/...
5 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问