服务器端包括 apache 启用

发布于 2025-01-05 18:54:29 字数 454 浏览 3 评论 0原文

我正在尝试让 SSI 在我的网站中使用它。 我想做的第一件事就是启用它并进行回显以验证它是否有效。

我有 apache2,在根目录中有一个 SSI 文件夹,在该文件夹中我创建了一个 .htaccess 文件,如下所示:

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

所以现在它应该启用 SSI。 (对吗?)

在SSI文件夹中有echo_ssi.shtml文件,包含:

<!--#echo var="DATE_GMT" -->

当我在浏览器中打开echo_ssi.shtml时,没有任何反应。 我想获取 GMT 时间和日期...

我在 SSI 启用配置中做错了什么? 我还需要做/添加其他事情吗?

I am trying to enable SSI to use it in my site.
The first thing that i am want to do is just enable it and do an echo to verified if it work at all.

I have apache2, in the root directory there is SSI folder and inside that folder i made a .htaccess file that look like this:

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

So now its supposed to enable SSI. (right?)

in the SSI folder there is echo_ssi.shtml file, contain:

<!--#echo var="DATE_GMT" -->

when i am open echo_ssi.shtml in the browser, nothing happen.
I suppose to get time and date in GMT...

What im doing wrong in the SSI enable configuration?
There is somthing else that im need to do / add?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

熊抱啵儿 2025-01-12 18:54:29

您是否扫描过 Apache 模块 mod_includeApache SSI 教程文档?

您需要确保正在加载 mod_include。

如果您列出了 .htaccess 行,那么

<HTML><BODY><!--#echo var="DATE_LOCAL" --></BODY></HTML>

应该返回一个包含日期和日期的页面。时间。

Have you scanned the Apache Module mod_include and the Apache SSI Tutorial documentation?

You need to ensure that you are loading mod_include.

If you have then with the .htaccess lines that you list then

<HTML><BODY><!--#echo var="DATE_LOCAL" --></BODY></HTML>

should return a page with the date & time on it.

绿萝 2025-01-12 18:54:29

服务器现金出现问题。需要清理服务器上的现金。

There was a problem with the server cash. need to clean the cash on the server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文