如何创建到另一个 PHP 页面的链接 [英] How to create a link to another PHP page

查看:21
本文介绍了如何创建到另一个 PHP 页面的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的一些 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>

这篇关于如何创建到另一个 PHP 页面的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆