• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alternate URI syntax

var_dump shows me bool(false)

My CI setup: http://www.freshface.be/orange.zip

OK, I'm using this test controller:


class Aseg_test extends Controller
    function test()

When I go to this URL:


This is the output:
string(4) "test"

I'm wondering if there's a problem with your uri_protocol or something else along those lines. I'd suggest you try each of the different protocols listed in the config.php file, and see if that helps at all.

Just tested them all, som gave a 404 others gave bool(false)

It works!
I loaded a wrong class in autoload and it messed up everything. Dont know why php didn't throw an error, but it works.

Glad you got it sorted. If this is your development server, I'd suggest that you ensure that at the top of index.php you have error_reporting(E_ALL). That should alert you as to just about every single error and warning encountered. I think it comes set to that by default, but I can't remember.

i tried to use this with ci svn but it doesen't work
i tried a var_dump($this->uri->asegment('keyword')); and it returns flase
i tried a print_r($this->asegments); inside the function asegment and the array si always empty
i tried a print_r($this->asegments); inside the function _reindex_segments() and the array is ok

any ideea ?

Have you tried the different URI protocols?

if global_xss_filtering is activated the lib dosen't work. i wanted to use the lib but i need global_xss_filtering more because i have lot's of forms

Why not use the post method for your forms? My library only works with the URI, and also, it's only intended to be used in a few controllers; not as a replacement for query strings. If you need this kind of flexibility for all of your controllers, you should consider using query strings.

Interesting solution.

Could you possibly implement a way to pass arrays in the URL as well?

Something like:

/color:red,green,blue/ or /color:red-green-blue/

Thanks mate

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.