Tag Archives: php

Yii : How to get raw POST

public function actionIndex() {
		if (Yii::app()->request->isAjaxRequest) {
			$postdata = file_get_contents("php://input");
			if ($postdata) {
        		// do something
         		$outObj = array('success' => true);
      		echo CJSON::encode($outObj);

“php://input allows you to read raw POST data.
It is a less memory intensive alternative to $HTTP_RAW_POST_DATA and does not need any special php.ini directives.”
took it from StackOverflow

Tagged , , ,

Yii : How to call a controller of a module


mms – module
service – controller

index action of service controller will be called

Tagged ,