当前位置: 首页>>代码示例>>PHP>>正文


PHP Qiniu_RS_Delete函数代码示例

本文整理汇总了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;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:8,代码来源:QiniuClass.php

示例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);
 }
开发者ID:timelessmemory,项目名称:uhkklp,代码行数:10,代码来源:RsTest.php

示例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);
 }
开发者ID:Fengtalk,项目名称:QiniuFile,代码行数:10,代码来源:Plugin.php

示例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";
     }
 }
开发者ID:sunlyliuh,项目名称:myproject,代码行数:15,代码来源:qiniu.class.php

示例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;
     }
 }
开发者ID:musicsnap,项目名称:Yaf.Global.Library,代码行数:12,代码来源:Qiniu.php

示例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);
 }
开发者ID:timelessmemory,项目名称:uhkklp,代码行数:14,代码来源:RsUtilsTest.php

示例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);
 }
开发者ID:rwifeng,项目名称:7niu,代码行数:16,代码来源:IoTest.php

示例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);
 }
开发者ID:rwifeng,项目名称:7niu,代码行数:18,代码来源:RioTest.php

示例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);
 }
开发者ID:timelessmemory,项目名称:uhkklp,代码行数:19,代码来源:PersistentTest.php

示例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"));
 }
开发者ID:returncn,项目名称:chen-xia-cms,代码行数:23,代码来源:AdminController.php

示例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;
 }
开发者ID:callmez,项目名称:yii2-file-system,代码行数:11,代码来源:Qiniu.php

示例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;
    }
}
开发者ID:eehello,项目名称:emlog_qiniu,代码行数:18,代码来源:attachment.php

示例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;
     }
 }
开发者ID:alonexy,项目名称:lea,代码行数:14,代码来源:W2Qiniu.php

示例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;
}
开发者ID:yszar,项目名称:linuxwp,代码行数:20,代码来源:qiniutek-options.php

示例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";
}
开发者ID:timelessmemory,项目名称:uhkklp,代码行数:31,代码来源:demo.php


注:本文中的Qiniu_RS_Delete函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。