krot

yii2 download file

Mar 19th, 2018
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if( file_exists( $upload_path ) ){
  2.             \Yii::$app->response->sendFile($upload_path, $plan['file_name']);
  3.         }
  4. \Yii::$app->end();
RAW Paste Data