Yii Framework Forum: How to intercept POST/GET data? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to intercept POST/GET data? Rate Topic: -----

#1 User is offline   Deepak Pradhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 209
  • Joined: 01-May 09
  • Location:Charlotte, NC

Posted 11 March 2010 - 02:42 AM

I am trying very simple case as noted below but I am not getting data as expected. What is that I am missing? Thnaks

URL:
http://localhost/aut...ta1&token=data2

Controller:
class authnController extends GServerController {
    public $defaultAction='authn';

    public function __construct() {
        parent::__construct();
        $this->layout='none'; 
    }

    public function actionAuthn() {
        echo "<pre>"; 
        print_r($_GET);
        print_r($_REQUEST);
        print_r($_POST);
}
}


Output I get:
Array
(
[r] => authn.html
)
Array
(
[r] => authn.html
[PHPSESSID] => irh2n4mc6dhn0f0k0v1ridn740
)
Array
(
)
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,562
  • Joined: 04-March 10
  • Location:UK

Posted 11 March 2010 - 05:49 AM

This looks very similar to a problem I had recently, caused by my apache rewrite rules. See if this helps:

Link
0

#3 User is offline   mbi 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 604
  • Joined: 08-May 09

Posted 11 March 2010 - 07:12 AM

var_dump(Yii::app()->request);

0

#4 User is offline   Deepak Pradhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 209
  • Joined: 01-May 09
  • Location:Charlotte, NC

Posted 11 March 2010 - 10:18 AM

View PostKeith, on 11 March 2010 - 05:49 AM, said:

This looks very similar to a problem I had recently, caused by my apache rewrite rules. See if this helps:

Link


It works with:
RewriteRule ^.*$ index.php [NC,L]
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users