Function Download in Yii2
<pre><code>public function actionUnduh($id) {
        $download = PstkIdentifikasi::findOne($id);
        $path = Yii::getAlias('../web/bukti/') . $download-&gt;bukti;

        if (file_exists($path)) {
            //return \Yii::$app-&gt;response-&gt;sendFile($download-&gt;pre_paper,@file_get_contents($path));
            return Yii::$app-&gt;response-&gt;sendFile($path);
        }
    }  
</code></pre>

<p>I need to download file from folder web/bukti, the code not error but the code doesn't work, Anyone can help me :(</p>