【发布时间】:2021-01-11 17:28:15
【问题描述】:
我正在尝试通过将所有文件从 public 复制到 Joomla 本地文件夹和 Joomla 中来将 svelte 应用程序包含到 Joomla 网站,我创建了一篇包含此 index.html
的脚本的文章苗条输出
+---public
| | favicon.png
| | index.html
| | output.doc
| |
| \---build
| bundle.css
| bundle.css.map
| bundle.js
| bundle.js.map
包含 index.html 的 Joomla 脚本
{source}
<?php ini_set("include_path", "/var/www/vhosts/examplesite.com/httpdocs/files/forms/public"); ?>
<?php include 'index.html'; ?>
{/source}
在本地,当我从公众发布 index.html 时,一切正常,在 Joomla noop 中运行。 错误是 Joomla 无法从 build 文件夹中找到文件,例如在 index.html 中包含 bundle.css 如下:
<script defer src='./build/bundle.js'></script>
我预计 bundle.js 的完整路径会是:
https://www.examplesite.com/files/forms/public/bundle.js
但实际上,浏览器需要它来自
https://www.examplesite.com/bundle.js
因此,build 文件夹中所有文件的路径都存在问题。救命!!!
【问题讨论】:
-
如果您正在做 Joomla 开发,那么您应该在Joomla Stack Exchange 上注册一个帐户。每当您有与 Joomla 相关的问题或将受益于对 Joomla 及其扩展有深入了解的志愿者的支持时,请在 JSE 上提问。我们没有得到足够的问题area51.stackexchange.com/proposals/58842/joomla
标签: javascript php html joomla svelte