gpt4 book ai didi

iphone - 位于phonegap iOS 应用程序中Documents 文件夹中的文件的文件url?

转载 作者:行者123 更新时间:2023-12-03 19:19:55 27 4
gpt4 key购买 nike

如果我需要在 html 文件中引用我的 PhoneGap iOS 应用程序上的文档文件夹下的文件,其文件 URL 会是什么样子?

最佳答案

getAbsolutePath("mead.jpg",
function(entry){
//alert(entry.fullPath);
$("#img_test").attr("src",entry.fullPath);
console.log("jq$:=" + entry.fullPath);
//$("#img_test").attr("src","img/test.jpg");
});

// file system
function getAbsolutePath(file_name,call_back){
var full_path = "";
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
function (file_system){
file_system.root.getFile(
file_name,
{create: false},
call_back
,
function(){
console.log("failed to fetch file, please check the name");
}
);

},
function(){
console.log("failed file sytem");
}
);


}

关于iphone - 位于phonegap iOS 应用程序中Documents 文件夹中的文件的文件url?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4414520/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com