我把KOD安装在了子目录,不是根目录。现在服务装好,插件装好,但是打开word是空白

我的访问端口也由80端口改成其他端口了,不知道是不是哪里设置的不对,我看调用onlyoffice的路径是在根目录里。我这子目录怎么修改呢。

<!DOCTYPE html>
<html style="height: 100%;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>ONLYOFFICE Document Server</title>
</head>
<body style="height: 100%; margin: 0;">
<div id="placeholder" style="height: 100%"></div>
<script type="text/javascript" src="http://192.168.2.9:890/web/web-apps/apps/api/documents/api.js"></script>

<script type="text/javascript">

    var docEditor;

    var options = {"document":{"fileType":"docx","key":"b9121c13ca7324c01d82e122554ee95c171501601919074","title":"PPT\u8bb2\u7a3f.docx","url":"http:\/\/222.89.239.221:890\/index.php?explorer\/share\/file&hash=43b2ZZyoDG9c7WY4bXJVGQzPkFhP11vEH__AnWtWcailOo6y0XxEchUd&name=PPT%E8%AE%B2%E7%A8%BF.docx","permissions":{"download":true,"edit":false,"print":true}},"documentType":"text","type":"desktop","editorConfig":{"callbackUrl":"","lang":"zh-CN","mode":"view","user":{"id":"1","name":"\u7cfb\u7edf\u7ba1\u7406\u5458 (yibowj)"},"customization":{"autosave":true,"chat":true,"commentAuthorOnly":true,"comments":true,"compactHeader":false,"compactToolbar":false,"help":true,"toolbarNoTabs":false,"hideRightMenu":false}},"height":"100%","width":"100%"};
    options.events = {};

                    docEditor = new DocsAPI.DocEditor("placeholder", options);

</script>

</body>
</html>

其中的 http://192.168.2.9:8001/web/web-apps/apps/api/documents/api.js
的IP地址为局域网IP,8001为kod的端口。

19 天 后
2 个月 后

出错了! (warning!)
OnlyOffice Document Server is not available.
The API of "http://" must be filled.

我的是如上提示还有救吗

1 个月 后

zhtengw 大佬您好,请问一下你的网盘有如下问题吗?
1、在本地新建一个word文档或excel表格,写点内容进去,然后上传到自己的网盘里面
2、在自己的网盘中使用大佬做的这个插件打开在线编辑,写点内容进去,然后关闭在线编辑
3、点击鼠标右键将此word文档或excel表格下载到本地,然后打开之后还是第一步中在本地写入的内容。在网盘在线编辑添加的内容没有。
备注:在网盘中在线打开可以看到在线编辑的内容已经写入到word文档或excel表格中了。另外也使用官方的demo站点做过测试,发现没有这个问题。
请求大佬研究一下这个是什么情况造成的?可不可能是因为插件或是兼容的问题造成,我是小白瞎猜的。

    13 天 后

    Noking
    getDocumentType()方法里的$fileExt参数获取失败,
    我这样好像可以了:
    重新申明这2个变量 $file和 $fileInfo,取消$fileInfo属性引用,

      Oliver-wills 没有配置防盗链,后面我又拿一台华为云服务器部署没有这个现象,有这个现象的是群晖DSM系统上出现的,可能是DSM系统上权限的原因造成的。