public function actionFile()
{
if ($_POST['file'])
{
$url = 'protected/flash/'. $_POST['file'] .'.swf';
if (file_exists($url))
{
$res = fopen($url, 'r');
$data = fread($res, filesize($url));
echo $data;
fclose($res);
}
}
}
But I get this error message, highlighting the “if ($_POST[‘file’])” line:
Also, I would like to know if it is possible to access a controller through a POST request, considering my flash file would call this website with this method?
I already did it but it is not helpful because my problem is not to know what variables are in $_POST, but simply to access their values, because Yii seems to have a problem when I simply use “$_POST[‘file’]”…