本文整理汇总了PHP中Qiniu_RS_Delete函数的典型用法代码示例。如果您正苦于以下问题:PHP Qiniu_RS_Delete函数的具体用法?PHP Qiniu_RS_Delete怎么用?PHP Qiniu_RS_Delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Qiniu_RS_Delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete($key)
{
$err = Qiniu_RS_Delete(new Qiniu_MacHttpClient(null), $this->_Bucket, $key);
if ($err !== null) {
return false;
}
return true;
}
示例2: testBatchStat
public function testBatchStat()
{
$key2 = 'testOp2' . getTid();
Qiniu_RS_Delete($this->client, $this->bucket, $key2);
$entries = array(new Qiniu_RS_EntryPath($this->bucket, $this->key), new Qiniu_RS_EntryPath($this->bucket, $key2));
list($ret, $err) = Qiniu_RS_BatchStat($this->client, $entries);
$this->assertNotNull($err);
$this->assertEquals($ret[0]['code'], 200);
$this->assertEquals($ret[1]['code'], 612);
}
示例3: deleteFile
public static function deleteFile($filepath)
{
// 获取插件配置
$option = self::getConfig();
// 初始化 SDK
self::initSDK($option->accesskey, $option->sercetkey);
// 删除
$client = new Qiniu_MacHttpClient(null);
return Qiniu_RS_Delete($client, $option->bucket, $filepath);
}
示例4: deleteFile
/**
* 删除存储的文件
* @param type $qiniuFileName 云存储里的文件名
*/
public function deleteFile($qiniuFileName)
{
$key1 = $qiniuFileName;
$client = new Qiniu_MacHttpClient(null);
$err = Qiniu_RS_Delete($client, $this->_bucket, $key1);
if ($err !== null) {
var_dump($err);
} else {
echo "Success! \n";
}
}
示例5: delete
public function delete($filename)
{
$this->setBucketAndKey($filename);
Qiniu_SetKeys($this->accessKey, $this->secretKey);
$client = new \Qiniu_MacHttpClient(null);
$err = Qiniu_RS_Delete($client, $this->bucket, $this->key);
if ($err !== null) {
return false;
} else {
return true;
}
}
示例6: testPut
public function testPut()
{
$key = 'tmp/testPut' . getTid();
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
list($ret, $err) = Qiniu_RS_Put($this->client, $this->bucket, $key, 'hello world!', null);
$this->assertNull($err);
$this->assertArrayHasKey('hash', $ret);
var_dump($ret);
list($ret, $err) = Qiniu_RS_Stat($this->client, $this->bucket, $key);
$this->assertNull($err);
var_dump($ret);
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
$this->assertNull($err);
}
示例7: testPut
public function testPut()
{
$key = 'testPut' . getTid();
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
$putPolicy = new Qiniu_RS_PutPolicy($this->bucket);
$upToken = $putPolicy->Token(null);
list($ret, $err) = Qiniu_Put($upToken, $key, "hello world!", null);
$this->assertNull($err);
$this->assertArrayHasKey('hash', $ret);
var_dump($ret);
list($ret, $err) = Qiniu_RS_Stat($this->client, $this->bucket, $key);
$this->assertNull($err);
var_dump($ret);
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
$this->assertNull($err);
}
示例8: testLargePut
public function testLargePut()
{
$key = 'testRioLargePut' . getTid();
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
$putPolicy = new Qiniu_RS_PutPolicy($this->bucket);
$upToken = $putPolicy->Token(null);
$putExtra = new Qiniu_Rio_PutExtra($this->bucket);
$reader = new MockReader();
list($ret, $err) = Qiniu_Rio_Put($upToken, $key, $reader, QINIU_RIO_BLOCK_SIZE + 5, $putExtra);
$this->assertNull($err);
$this->assertEquals($ret['hash'], "lgQEOCZ8Ievliq8XOfZmWTndgOll");
var_dump($ret);
list($ret, $err) = Qiniu_RS_Stat($this->client, $this->bucket, $key);
$this->assertNull($err);
var_dump($ret);
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
$this->assertNull($err);
}
示例9: testPutWithPersistentOps
public function testPutWithPersistentOps()
{
$key = 'testPutWithPersistentOps' . getTid();
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
$putPolicy = new Qiniu_RS_PutPolicy($this->bucket);
$putPolicy->PersistentOps = 'avthumb/mp3';
$putPolicy->PersistentNotifyUrl = 'http://someurl/abc';
$upToken = $putPolicy->Token(null);
list($ret, $err) = Qiniu_Put($upToken, $key, "hello world!", null);
$this->assertNull($err);
$this->assertArrayHasKey('hash', $ret);
$this->assertArrayHasKey('persistentId', $ret);
var_dump($ret);
list($ret, $err) = Qiniu_RS_Stat($this->client, $this->bucket, $key);
$this->assertNull($err);
var_dump($ret);
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
$this->assertNull($err);
}
示例10: actionDelmv
public function actionDelmv($id)
{
Yii::import('application.vendors.*');
require_once 'Qiniu/rs.php';
require_once 'Qiniu/io.php';
$bucket = Yii::app()->params['bucket'];
$accessKey = Yii::app()->params['accessKey'];
$secretKey = Yii::app()->params['secretKey'];
$mvModel = new Mv();
$mvInfo = $mvModel->findByPk($id);
if ($mvInfo != NULL) {
Qiniu_SetKeys($accessKey, $secretKey);
$client = new Qiniu_MacHttpClient(null);
$err = Qiniu_RS_Delete($client, $bucket, $mvInfo['mv']);
}
//上传业务数据库中数据
if ($mvModel->deleteByPk($id)) {
Yii::app()->user->setFlash('delmvstatus', 'YES,删除视频成功 :)');
} else {
Yii::app()->user->setFlash('delmvstatus', 'Sorry,系统出错,删除视频失败 :(');
}
$this->redirect(array("imv"));
}
示例11: delete
/**
* Delete a file
*
* @param $path
* @return bool
*/
public function delete($path)
{
$err = Qiniu_RS_Delete($this->getClient(), $this->bucket, $path);
return $err === null;
}
示例12: deleteQiNiu
function deleteQiNiu($filePath)
{
//这里写入七牛的空间名
$bucket = "1111";
//$bucket = "gavinwen-topic";
$key1 = basename($filePath);
//这里写入七牛的accessKey和secretKey
$accessKey = 'sVv4Xk-11';
$secretKey = '333-11222';
Qiniu_SetKeys($accessKey, $secretKey);
$client = new Qiniu_MacHttpClient(null);
$err = Qiniu_RS_Delete($client, $bucket, $key1);
if ($err !== null) {
return false;
} else {
return true;
}
}
示例13: deleteFile
public static function deleteFile($key)
{
Qiniu_SetKeys(W2Config::$Qiniu_accessKey, W2Config::$Qiniu_secretKey);
$client = new Qiniu_MacHttpClient(null);
$err = Qiniu_RS_Delete($client, W2Config::$Qiniu_bucket, $key);
if ($err !== null) {
if (defined('IS_SQL_PRINT') && IS_SQL_PRINT) {
var_dump($err);
}
return false;
} else {
return true;
}
}
示例14: wpjam_qiniutek_update_file
function wpjam_qiniutek_update_file($file, $echo = true)
{
global $qiniutek_client;
if (!$qiniutek_client) {
$qiniutek_client = wpjam_get_qiniutek_client();
}
$wpjam_qiniutek = get_option('wpjam-qiniutek');
$qiniutek_bucket = $wpjam_qiniutek['bucket'];
$file_array = parse_url($file);
$key = str_replace($file_array['scheme'] . '://' . $file_array['host'] . '/', '', $file);
$err = Qiniu_RS_Delete($qiniutek_client, $qiniutek_bucket, $key);
if ($echo) {
if ($err !== null) {
$msg = ' 发生错误:<span style="color:red">' . $err->Err . '</span><br />';
} else {
$msg = ' 清理成功<br />';
}
}
return $msg;
}
示例15: var_dump
var_dump($err);
} else {
var_dump($ret);
}
# @endgist
# @gist copy
$err = Qiniu_RS_Copy($client, $bucket, $key1, $bucket, $key2);
echo "\n\n====> Qiniu_RS_Copy result: \n";
if ($err !== null) {
var_dump($err);
} else {
echo "Success! \n";
}
# @endgist
# @gist delete
$err = Qiniu_RS_Delete($client, $bucket, $key1);
echo "\n\n====> Qiniu_RS_Delete result: \n";
if ($err !== null) {
var_dump($err);
} else {
echo "Success! \n";
}
# @endgist
# @gist move
$err = Qiniu_RS_Move($client, $bucket, $key2, $bucket, $key1);
echo "\n\n====> Qiniu_RS_Move result: \n";
if ($err !== null) {
var_dump($err);
} else {
echo "Success! \n";
}