Codeigniter 代码点火器路径问题
我正在尝试将我的视图页面链接到另一个控制器 我的test_view.php页面Codeigniter 代码点火器路径问题,codeigniter,Codeigniter,我正在尝试将我的视图页面链接到另一个控制器 我的test_view.php页面 //this page address is base_url/controller1/function1 <a href='controller1/function2'> test </a> 有人能帮我吗?非常感谢。它链接到一个相对URL,您需要从“/”开始使用web根目录 <a href='/controller1/function2'> test </a> 它
//this page address is base_url/controller1/function1
<a href='controller1/function2'> test </a>
有人能帮我吗?非常感谢。它链接到一个相对URL,您需要从“/”开始使用web根目录
<a href='/controller1/function2'> test </a>
它链接到一个相对URL,您需要以“/”开头才能使用web根目录
<a href='/controller1/function2'> test </a>
当然--您只需告诉CodeIgniter显示路径:
<a href="<?php echo site_url("controller1/function2");?>">
这样做的好处是,如果我最初在子目录中开发站点,我可以将site_path设置为return”/subdirectory/$url“
,然后在启动后删除子目录 当然--您只需要告诉CodeIgniter显示路径:
<a href="<?php echo site_url("controller1/function2");?>">
这样做的好处是,如果我最初在子目录中开发站点,我可以将site_path设置为
return”/subdirectory/$url“
,然后在启动后删除子目录 您可以在test_view.php页面中使用以下代码,
您可以在test\u view.php页面中使用以下代码,