I'm creating various 'my version' of web services. Basically, it's a yii controller with lots of actions.. each action is as follow
public function actionNameOfWebService()
{
if(isset($_POST))
{
// do some processing, when I have a result... I do ..
print CJSON::encode('result.');
}
else
{
print CJSON::encode('only post methods allowed');
}
}
Lots of those actions are in one particular controller. Everything's working fine..before I go to production, do I need to add a 'die;' statement after every print CJSON::encode statement.