當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。