Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Yii Link 有问题。我的应用程序在 localhost 中运行良好,但我已将其移至服务器。服务器中的所有链接都重定向到本地主机。在这种情况下有人可以帮助我吗?我是否必须在配置文件中添加更多内容。提前致谢。
你CHtml::link()是用来创建链接的吗?如果你已经为 url 这样做了,你是否提供了一个数组,如下所示:
CHtml::link()
array('Controller/Action', 'param'=>value)
例子:
array('post/list', 'page'=>3)
最后您将获得:
CHtml::link("your text link", array('post/list', 'page'=>3));
(我问它是因为如果您已经编写了每个链接,那么每个链接都重定向到本地主机是正常的!)