题
嗨,我试图将Zoho集成到我的网站中,并使用WAMP服务器在浏览器IM中打开文档。
这是我试图使用的代码:
<html>
<head>
</head>
<body>
<form method="POST" action="http(s)://export.writer.zoho.com/remotedoc.im" target="_self"
accept-charset="UTF-8">
<input type="hidden" name="url" value="http://localhost/paper.doc">
<input type="hidden" name="apikey" value="here goes api key">
<input type="hidden" name="output" value="url">
<input type="hidden" name="mode" value="normaledit">
<input type="hidden" name="filename" value="paper.doc">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="skey" value="here goes secret value">
<input type="hidden" name="id" value="12345678">
<input type="hidden" name="format" value="doc">
<input type="hidden" name="saveurl" value="http://localhost/save.php">
<input type="submit" name="submit" value="Open/Edit">
</form>
</body>
</html>
我不知道我有这个错误:禁止
您无权访问/http(://export.writer.zoho.com/remotedoc.im在此服务器上。
我已经正确输入了API键,而秘密密钥我只是困惑并粘在这里。
解决方案
您已将(S)从URL中取出吗?我知道这似乎是一个愚蠢的问题,但我认为如果您忽略了它,我应该检查一下。 URL为我解决,并给出“ API密钥无效”警告。
给出的错误似乎表明浏览器认为其相对而不是绝对URL。
其他提示
我对Zoho的了解不多,但我也想在将来的项目中实现这一点。当我读到 https://apihelp.wiki.zoho.com/open-document.html#mfs 它说,SaveUrl必须可以公开访问,如果它不可公开访问,则会出现错误,而Localhost则无法公开访问,因此会出现错误。
不隶属于 StackOverflow