Posts tagged with yii
This is a quick note about my favorite PHP framework (Yii2) which I used recently.
Postgresql File Upload
// upload handling
// retrieve upload file if is a post
$uploadFile = UploadedFile::getInstance($model, 'some_file');
// retrieve tmp file content and convert to hex to store into bytea
$model->byteaColumn = bin2hex( file_get_contents($uploadFile->tempName) );
Postgresql File Download Script
$response = \Yii::$app->response;
It is now 3am in the morning. My love is sleeping happily. And I am happily learning about the new version of the Yii framework. It is just awesome as usual :) I can see lots of work have been put into this version. Now Yii has 2 application templates (basic , advanced) and tons of new features which should make it a leading framework again :) It offers so much more than Laravel (more opinionated) and offers a lot more features out of the box :) Beta version also gives me more confidence in its stablity.
I prefer the way Yii handle...