如何创建到另一个 PHP 页面的链接

2022-01-02 00:00:00 hyperlink templates php html anchor

我刚刚将我的一些 HTML 页面转换为 PHP 页面,我对 PHP 不太熟悉.在我的 HTML 页面中,假设它只是一个静态 Web 应用程序,我可以通过在页面上播放以下 anchor 来非常简单地链接到另一个页面:

I just converted some of my HTML pages to PHP pages, and I'm not that familiar with PHP. In my HTML pages, assuming it's just a static web app, I can link to another page quite simply by playing the following anchor on the page:

<a href="go-to-this-page.html">这是一个链接</a>

因此,在将页面转换为 PHP 后,为了确保我可以更轻松快捷地进行模板和包含模板,我不知道如何包含这些链接.

So, after converting the pages to PHP in order to make sure that I can template and include templates a bit easier and faster, I don't know how to include these links.

例如,假设我有两个页面,index.phppage2.php.我将如何创建指向此页面的锚链接?

For example, say I have two pages, index.php, and page2.php. How would I create an anchor link to this page?

这是一个链接

推荐答案

像这样使用

<a href="index.php">Index Page</a>
<a href="page2.php">Page 2</a>

相关文章