php – 如何在Codeigniter上隐藏URL字符串中的数据
发布时间:2020-12-13 22:23:17 所属栏目:PHP教程 来源:网络整理
导读:我是Codeigniter的初学者,所以我需要帮助. 我正在使用Codeignite来制作博客网站我不知道如何隐藏控制器类和URL中的ID. 就像我生成了以下URL:http://localhost/codeigniter/index.php/content/some-title/123. content是我的控制器类名. some-title是我的文
我是Codeigniter的初学者,所以我需要帮助.
我正在使用Codeignite来制作博客网站我不知道如何隐藏控制器类和URL中的ID. 就像我生成了以下URL:http://localhost/codeigniter/index.php/content/some-title/123. > content是我的控制器类名. 我想只保留标题. 例如:http://localhost/codeigniter/index.php/some-title. 任何帮助,将不胜感激!!! 解决方法
您已添加链接config / routes.php
http://localhost/codeigniter/index.php/content/some-title/123 Ex: $route ['some-title/(: any)'] = 'content/some-title/$123'; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |