Created
November 13, 2013 14:58
-
-
Save sakadonohito/7450426 to your computer and use it in GitHub Desktop.
FuelPHP Upload::register(event,callback);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| Upload::save()を行う前にアップロードするファイル名をエンコードするイケナイ方法 | |
| ファイル名に含まれている半角カナを全角に変換し、さらに内部エンコードからCP932にエンコード | |
| **/ | |
| Upload::register('before',function($file){ | |
| $file['filename'] = mb_convert_encoding(mb_convert_kana($file['filename'],"KV"),"CP932"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment