|
楼主 |
发表于 2015-11-17 09:15:13
|
显示全部楼层
https://codeigniter.org.cn/forums/forum.php?mod=attachment&aid=MzM5NnxmYTBkN2FiYnwxNzM5Mjc3MTA0fDB8
PHP复制代码
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Url extends CI_Controller {
public function index ()
{
//参考例子地址,下面所有测试以这个地址为准:
//且test为文件夹,url为控制器
//http://loginapi.com/test/url/index/a/12
// uri_string() 返回一个相对的 URI 字符串
echo $this->uri->uri_string(); //输出:test/url/index/a/12
echo '<br />-----<br />';
// ruri_string() 该方法和 uri_string() 类似, 只是它用于返回路由后的 URI 。???
echo $this->uri->ruri_string(); //输出:test/url/index/a/12
echo '<br />-----<br />';
}
}
复制代码
|
|