【发布时间】:2017-02-12 08:43:03
【问题描述】:
我需要显示指向 html 文件的链接。该文件的路径是根folder/test/index.html。我尝试使用
$this->URL->build, href
但还是没有运气。
【问题讨论】:
-
你的意思是什么代码?
标签: php cakephp hyperlink href
我需要显示指向 html 文件的链接。该文件的路径是根folder/test/index.html。我尝试使用
$this->URL->build, href
但还是没有运气。
【问题讨论】:
标签: php cakephp hyperlink href
将您的 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');
【讨论】: