Cakephp 2.x HTML 外部链接助手不起作用
我正在执行以下操作:
<?php echo $this->Html->link('click here', 'www.notw.com', array('target' => '_blank')); ?>
尽管如此,创建的指向: mysite.local/current_controller/www.notw.com
如何使我的链接对外部正常工作?
谢谢
I'm doing the following:
<?php echo $this->Html->link('click here', 'www.notw.com', array('target' => '_blank')); ?>
Still, the created points to: mysite.local/current_controller/www.notw.com
How can I make my link to work properly for externals?
Thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您应该尝试
http://www.notw.com
而不仅仅是www
。要解决这个问题,无需协议,即。 http 或 https 只需添加
//
在 url 之前,它会自动为您解析协议。
Perhaps you should try
http://www.notw.com
instead of justwww
.To resolve this w/o the protocol ie. http or https just add
//
before url and it will auto resolve the protocol for you.