且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

$ _GET在Codeigniter 2.1.3中不起作用

更新时间:2023-02-06 12:01:46

此行将解析URL并填充 $ _ GET 数组URL参数:

This line will parse the URL and populate the $_GET array with the URL's parameters:

parse_str(substr(strrchr($_SERVER['REQUEST_URI'], "?"), 1), $_GET);

然后可以像访问数组一样访问它,例如:

It can then be accessed as you would normally access an array, for example:

$ref = $_GET['ref'];

您应设置 - application / config / config.php 如下:

You config - application/config/config.php - should be set as follows:

$config['uri_protocol'] = "PATH_INFO";