Welcome Guest, Not a member yet? Register   Sign In
URI changes . to _ (best practice?)
#5

[eluser]escape[/eluser]
I just added this function to the default CI welcome.php controller

Code:
function catch_number($decimal)
    {      
         echo "uri_string: " . $this->uri->uri_string() . '<BR>';
        echo "thrown number: $decimal <BR><BR>";
        foreach($_SERVER as $k => $v) echo "$k => $v<BR>";
    }


Then entered the following in the browser address bar: index.php?/welcome/catch_number/3.14159265

What follows is a summary of the various outputs:

Quote:With the URI PROTOCOL set to:

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

CI echos the following:

uri_string: /welcome/catch_number/3_14159265
thrown number: 3_14159265

.many variables in the loop, but QUERY_STRING was of note.
.
QUERY_STRING => /welcome/catch_number/3.14159265
.
.
=======================================================================

With the URI PROTOCOL set to:

================== $config['uri_protocol'] = "QUERY_STRING"; ==================
CI echos the following:

uri_string: /welcome/catch_number/3.14159265
thrown number: 3.14159265

.many variables in the loop, but QUERY_STRING was of note.
.
QUERY_STRING => /welcome/catch_number/3.14159265
.
.
=======================================================================

The other Delicious Flavors do this:

===== $config['uri_protocol'] = "PATH_INFO"; & "ORIG_PATH_INFO" ==================
redirects controller to index()

================== $config['uri_protocol'] = "REQUEST_URI"; ==================
Throws this error message: The URI you submitted has disallowed characters.


Messages In This Thread
URI changes . to _ (best practice?) - by El Forum - 08-23-2010, 08:32 AM
URI changes . to _ (best practice?) - by El Forum - 08-23-2010, 09:56 AM
URI changes . to _ (best practice?) - by El Forum - 08-23-2010, 10:41 AM
URI changes . to _ (best practice?) - by El Forum - 08-23-2010, 11:20 AM
URI changes . to _ (best practice?) - by El Forum - 08-23-2010, 07:52 PM
URI changes . to _ (best practice?) - by El Forum - 01-18-2011, 01:38 PM
URI changes . to _ (best practice?) - by El Forum - 01-18-2011, 04:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB