Answer the question
In order to leave comments, you need to log in
Yii Post request to current page?
in php constantly used post requests. and in yii even everything goes through controllers, ajax and so on.
how mona implement the following
<form id="newForm" method="post">
<input type="submit" name="ex" value="Excel" onclick="document.getElementById("newForm").submit()">
</form>
if(isset($_POST["ex"]))
{
header('Content-Type: text/x-csv; charset=utf-8');
header("Content-Disposition: attachment;filename=".date("d-m-Y")."-export.xls");
header("Content-Transfer-Encoding: binary ");
}
Answer the question
In order to leave comments, you need to log in
https://github.com/yiisoft/yii2/blob/master/docs/g...
https://github.com/yiisoft/yii2/blob/master/docs/g...
and it might be useful there will be routing
https://github.com/yiisoft/yii2/blob/master/docs/g...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question