• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sending variables via URI string

I have done the above (changed AllowEncodedSlashes to On), now my play controller is echoing 'http:' and that is it...

I don't understand this bit:
Quote:Once you've done this you might need to fiddle around with
in codeigniter if it is still not working - you may find the slashes get filtered out

[quote author="Matthieu Fauveau" date="1271482346"]Try editing the config/routes.php and add something like :

$route['test/play/:any'] = 'test/play';

That should help Wink[/quote]

I think you should try:

$route['test/play/:any'] = 'test/play/$1';

Sorry, it is still the same. =(

As this doesn't seem to be working, is there any other viable way to send the url from one controller to another?

I was thinking something like using sessions... but that seems a bit overkill.

Maybe you can pass the hex value of the url with bin2hex() and then in your controller you can decode it using pack()

this is for generating the url
$url = site_url('test/play/'.bin2hex('http://your-url'));

and then

class Test extends Controller {

    function Test()
    function index()

    function play($url)
        echo pack('H*',$url);

That worked... it comes out as a very long string but thanks a ton! =)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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