此 html 代码是否在其中使用 php 而没有 迹象?

发布于 2024-12-06 20:37:08 字数 642 浏览 2 评论 0原文

<a href="?page={$smarty.section.page.index}&{$per_pages_vars}">{$smarty.section.page.index}</a>
{/if}
{/section}
{if $pagesArray.is_next_page eq 'Y'}
  <span class="resultsnext">
    <a href="?page={$pagesArray.next_page_is}{if $id}&id={$id}{/if}&{$per_pages_vars}">&gt;</a>      
  </span>
{/if} 

我以前写过简单的基于 php 的网站,但这是我第一次涉足复杂的 php 网站,而其他人已经在很大程度上完成了。这也是我第一次在网站的 html 模板部分看到这种类型的代码。

基本上,我很好奇的是,{} 大括号中的所有代码是什么?它是某种 php 代码吗?另一个 php 文件引用了包含上述代码的 .html 文件。

有很多内容是动态生成的,但我从未见过在 .html 文件中使用“{}”大括号,同时将其用作模板的一部分,所以我想知道你们中的一些人是否可以启发我。

谢谢。

<a href="?page={$smarty.section.page.index}&{$per_pages_vars}">{$smarty.section.page.index}</a>
{/if}
{/section}
{if $pagesArray.is_next_page eq 'Y'}
  <span class="resultsnext">
    <a href="?page={$pagesArray.next_page_is}{if $id}&id={$id}{/if}&{$per_pages_vars}">></a>      
  </span>
{/if} 

I have written simple php based websites before but this is the first time I am getting involved in a complex php website that another person has already finished to a large extent. This is also the first time I'm seeing this type of code in a html template section of the website.

Basically, what I'm curious is, what are all the code in the {} curly brackets? Is it some sort of php code? Another php file refers this .html file that is containing the above code.

There is a lot of content being dynamically generated, but I've never seen '{}' curly brackets being used in a .html file while having it being used as part of a template so I was wondering if some of you guys could enlighten me.

thanks.

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

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

发布评论

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

评论(4

ま昔日黯然 2024-12-13 20:37:08

这是一种 PHP 模板语言,具体来说是 Smarty

Smarty 解析文件以获取其自己的语法,并用绑定到 smarty 视图的变量等替换其占位符。

Smarty 文档

That is a PHP templating language, specifically, Smarty.

Smarty parses the file for its own syntax and replaces their placeholders with variables, etc that are bound to the smarty view.

Smarty Documentation.

2024-12-13 20:37:08

您正在查看 Smarty 标签。以下是当前文档的链接。

You're looking at Smarty tags. Here's a link to the current documentation.

许一世地老天荒 2024-12-13 20:37:08

它很聪明:)

实际上你正在看部分。

http://www.smarty.net/docsv2/en/language.function .section.tpl

It's smarty :)

Actually you're looking at sections.

http://www.smarty.net/docsv2/en/language.function.section.tpl

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