How to create a link to another PHP page(如何创建到另一个 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.php 和 page2.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 页面的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何创建到另一个 PHP 页面的链接
基础教程推荐
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- php中的foreach复选框POST 2021-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- php中的PDF导出 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- Web 服务器如何处理请求? 2021-01-01
