【问题标题】:Links to HTML files in cakephpcakephp 中 HTML 文件的链接
【发布时间】:2017-02-12 08:43:03
【问题描述】:

我需要显示指向 html 文件的链接。该文件的路径是根folder/test/index.html。我尝试使用

$this->URL->build, href

但还是没有运气。

【问题讨论】:

  • 你的意思是什么代码?

标签: php cakephp hyperlink href


【解决方案1】:

将您的 HTML 文件放入 cakephp webroot 文件夹中。

webroot/
  index.php
  css/
  img/
  js/
  test/   <--- html content
   index.html
   other.html

建立链接:

 <?php echo $this->Html->link('LINK 1','/test/index.html');

【讨论】:

    猜你喜欢
    • 2012-01-25
    • 1970-01-01
    • 1970-01-01
    • 2018-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-11
    • 2020-12-09
    相关资源
    最近更新 更多