有人可以告诉我如何使用PHP从Google云端存储中删除对象吗?
我找到了如何通过添加对象
move_uploaded_file($gs_name, "gs://sample-storage/myfolder/new_file2.jpg");
Run Code Online (Sandbox Code Playgroud)
通过获取公共URL
$public_url = CloudStorageTools::getPublicUrl("gs://sample-storage/myfolder/new_file2.jpg", true);
Run Code Online (Sandbox Code Playgroud)
通过导入以下内容
require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php';
use google\appengine\api\cloud_storage\CloudStorageTools;
Run Code Online (Sandbox Code Playgroud)
但是如何使用PHP 删除文件?
有人可以分享PHP中的代码吗?如果PHP没有暗中支持它,甚至使用JavaScript.
我用我的网页,加载来自服务器内容的数据表服务器端处理,我想补充rowReordering jQuery的数据表行重排序功能吧.这就是我之前尝试过的方式.
$('.data_table').dataTable( {
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "Display <select>'+'<option value=\"10\">10</option>'+'<option value=\"20\">20</option>'+'<option value=\"30\">30</option>'+'<option value=\"40\">40</option>'+'<option value=\"50\">50</option>'+'<option value=\"-1\">All</option>'+'</select> records"
},
"processing": true,
"serverSide": true,
"ajax": dataUrl
} ).rowReordering({
sURL:sortUrl, // Let the server page know if order is changed
sRequestType: "GET",
fnAlert: function(message) {
modalError("Server Error",message,null); // Error message if an server error occured during the process
}
});
$.extend( $.fn.dataTableExt.oStdClasses, {
"sWrapper": "dataTables_wrapper form-inline"
} );
Run Code Online (Sandbox Code Playgroud)
这实际上可以拖放数据,但是在执行此操作后它不会发送任何服务器通知,也不会将删除的行保留在丢弃的位置(它返回到之前的位置).
我也尝试过以下操作.
$table = $('.data_table').dataTable( {
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": …Run Code Online (Sandbox Code Playgroud)