php - I am trying to set up microsoft azure storage acces using code igniter. It is not working -
i using codeigniter project. need use azure storage. have used composer microsoft azure php libraries. trying list buckets in model file. type
use windowsazure\common\servicesbuilder;
int file. on execution, crashes @ line. path problem. can help? tried puting require "vendor/autoload.php"
file. didn't help. can make work?
as using composer, can install codeigniter 1 command. see codeigniter composer installer details.
composer create-project kenjis/codeigniter-composer-installer codeigniter
then cd
ci project path , install azure sdk php running command:
composer require microsoft/windowsazure
after these done, can use following code work azure storage in controller.
<?php defined('basepath') or exit('no direct script access allowed'); use windowsazure\common\servicesbuilder; class welcome extends ci_controller { public function index() { $account = 'youraccoutname'; $key = 'youraccesskey'; $connectionstring = "defaultendpointsprotocol=http;accountname=$account;accountkey=$key"; $blobrestproxy = servicesbuilder::getinstance()->createblobservice($connectionstring); // ... $this->load->view('welcome_message'); } }
Comments
Post a Comment